How to Delete Corrupted Files on a PC or Mac
How to Delete Corrupted Files on a PC or Mac
This wikiHow article will teach you how to delete corrupted files on Windows and Mac using the administrator account, Safe Mode, and command prompt on Windows, as well as Terminal and Safe Mode on Mac. Usually, you can drag the file you want to delete into the recycling bin/trash can and empty that, but some files (like corrupted files) will cause errors when you try to delete them.
Things You Should Know
  • On Windows, you can drag corrupted files to the Recycle Bin if you're logged in as an Administrator.
  • On a Mac, you can delete corrupted files in Terminal using the command sudo rm -R filename.
  • You can also delete corrupted files on both Windows and macOS by booting into Safe Mode.

Deleting as an Administrator on Windows

Close all programs you were working on and restart your computer. If your account isn't an admin account, you may not have the permissions set up to delete certain files, so you'll need to log in to an administrator account.

Log in to an administrator account. As an administrator, you won't have any trouble deleting corrupted files.

Locate the corrupted file you want to delete. You'll find it on either your desktop or in File Explorer.

Drag the corrupted file to the Recycle Bin. This recycling can icon is usually on your desktop.

Right-click the Recycle Bin icon and select Empty Recycle Bin. This is usually the second option in the list next to another recycling bin icon.

Using Command Prompt on Windows

Open Command Prompt as an Administrator. You can click the Start menu icon and type "cmd" to open a list of search results then click the Command Prompt program and click Run as administrator. For this method, you need the file path of the file you want to delete. If you don't know how to get a file's file path, refer to How to Find a File's Path on Windows.

Enter the following code into the command prompt window: "Del /F /Q /A " Replace with your file's location. For example, you might have "Del /F /Q /A C:\Users\John\Downloads". "/F" means to force delete files, "/Q" means to delete read-only files, and "/A" means to select files with the archiving attribute.

Press ↵ Enter. Your file should be deleted.

Using Safe Mode on Windows

Close all programs you were working on and restart your computer. You'll want to use this method if the previous steps did not work for you.

Press F8 before the Windows logo appears. You may miss this on your first try, so you might need to restart your computer again. For more information, you can look at How to Activate Safe Mode in Windows 10 Using F8, How to Activate Safe Mode in Windows 10 using the Power Menu, and How to Start Windows in Safe Mode for older versions of Windows.

Select Advanced options. You'll see this on the right side of your screen.

Select Startup Settings and Restart. Your computer will restart again with Startup Settings.

Enable Safe Mode. You'll need to press the corresponding number (1-9) or function key (F1-F9) to make your selection.

Locate the file you want to delete. You'll find it on either your desktop or in your file explorer.

Drag the file to the Recycle Bin. This recycling can icon is usually on your desktop.

Right-click the Recycle Bin icon and select Empty Recycle Bin. The files inside the Recycling Bin should be deleted; if you continue to get an error, continue to the other methods.

Using Terminal on Mac

Open Terminal. You can find the Terminal app icon in the Utilities folder of Finder.

Enter the following code into the Terminal window, but don't press ⏎ Return: "sudo rm -R ". You'll want to make sure you add a space after the last "R" in the code.

Locate the file you want to delete in Finder. Make sure you can see your Terminal window at the same time.

Drag the file you want to delete from Finder into the Terminal window. The file's location and name will add to the end of your command. Press the Return key to delete the file.

Enter the Admin password and press ⏎ Return. This will prompt Terminal to permanently delete the file.

Using Safe Mode on Mac

Click the Apple logo Mac Apple. You'll see this in the top left corner of your screen.

Click Restart and press ⇧ Shift. Hold down the Shift key as your Mac restarts to enable Safe Mode. You can release the Shift key at the login window, as Safe Mode has been activated.

Log into your account and locate the file you want to delete. Since your Mac is in Safe Mode, you might be able to delete the corrupted file.

Drag the file to the Trash. You can also click to select the file in Finder, then go up to the menu and select Move to Trash.

Empty Trash. Click and hold on the Trash icon. After a few seconds, a menu will pop up, and you can click Empty Trash. Restart your Mac again to exit Safe Mode. If those steps still caused an error to pop up, try the next method.

What's your reaction?

Comments

https://terka.info/assets/images/user-avatar-s.jpg

0 comment

Write the first comment for this!