How to Delete Corrupted Files on a PC or Mac

Download Article
Get rid of corrupted files in seconds on your PC or Mac
Download Article

If you get an error when deleting a corrupted file, you can often fix it by booting into Safe Mode and trying again. You can also use the command sudo rm -R filename in Terminal on a Mac, or del /F /Q /A <filepath> in Command Prompt in Windows. Read on for more easy ways to delete corrupted files.

Deleting Corrupted Files Easily

  • Boot your PC or Mac into Safe Mode, then delete the files normally.
  • On Windows, you can also open Command Prompt as an administrator and use del /F /Q /A <filepath>.
  • On a Mac, delete corrupted files in Terminal using the command sudo rm -R filename.
Method 1
Method 1 of 5:

Deleting as an Administrator on Windows

Download Article
  1. How.com.vn English: Step 1 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.
  2. How.com.vn English: Step 2 Log in to an administrator account.
    As an administrator, you won't have any trouble deleting corrupted files.
    Advertisement
  3. How.com.vn English: Step 3 Locate the corrupted file you want to delete.
    You'll find it on either your desktop or in File Explorer.
  4. How.com.vn English: Step 4 Drag the corrupted file to the Recycle Bin.
    This recycling can icon is usually on your desktop.
  5. How.com.vn English: Step 5 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.
  6. Advertisement
Method 2
Method 2 of 5:

Using Command Prompt on Windows

Download Article
  1. How.com.vn English: Step 1 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.
  2. How.com.vn English: Step 2 Enter the following code into the command prompt window:
    "Del /F /Q /A <filepath>"
    • Replace <filepath> 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.[1]
  3. How.com.vn English: Step 3 Press ↵ Enter.
    Your file should be deleted.
  4. Advertisement
Method 3
Method 3 of 5:

Using Safe Mode on Windows

Download Article
  1. How.com.vn English: Step 1 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.
  2. How.com.vn English: Step 2 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.
  3. How.com.vn English: Step 3 Select Advanced options.
    You'll see this on the right side of your screen.
  4. How.com.vn English: Step 4 Select Startup Settings and Restart.
    Your computer will restart again with Startup Settings.
  5. How.com.vn English: Step 5 Enable Safe Mode.
    You'll need to press the corresponding number (1-9) or function key (F1-F9) to make your selection.
  6. How.com.vn English: Step 6 Locate the file you want to delete.
    You'll find it on either your desktop or in your file explorer.
  7. How.com.vn English: Step 7 Drag the file to the Recycle Bin.
    This recycling can icon is usually on your desktop.
  8. How.com.vn English: Step 8 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.
  9. Advertisement
Method 4
Method 4 of 5:

Using Terminal on Mac

Download Article
  1. How.com.vn English: Step 1 Open Terminal.
    You can find the Terminal app icon in the Utilities folder of Finder.
  2. How.com.vn English: Step 2 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.
  3. How.com.vn English: Step 3 Locate the file you want to delete in Finder.
    Make sure you can see your Terminal window at the same time.
  4. How.com.vn English: Step 4 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.
  5. How.com.vn English: Step 5 Enter the Admin password and press ⏎ Return.
    This will prompt Terminal to permanently delete the file.
  6. Advertisement
Method 5
Method 5 of 5:

Using Safe Mode on Mac

Download Article
  1. How.com.vn English: Step 1 Click the Apple logo icon.
    You'll see this in the top left corner of your screen.
  2. How.com.vn English: Step 2 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.
  3. How.com.vn English: Step 3 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.
  4. How.com.vn English: Step 4 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.
  5. How.com.vn English: Step 5 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.
  6. Advertisement

Tips

Submit a Tip
All tip submissions are carefully reviewed before being published
Thanks for submitting a tip for review!

Common Questions

Can a corrupt file be fixed?

Sometimes the software that created the file (such as Microsoft Word) will have a built-in utility that can repair corrupted files. Other times, you'll need to contact a professional file recovery service.

Why am I getting corrupted files?

Corruption can occur if your computer loses power or an app crashes while a file is in use. Corruption can also happen if your hard drive is fragmented, there's a power surge, or your computer freezes while saving a file.[2]

How can I repair corrupted system files?

On Windows, try using the command sfc /scannow at the Command Prompt. This runs the system file checker, which searches for and repairs corruption in system files.[3]

About This Article

How.com.vn English: Darlene Antonelli, MA
Written by:
How.com.vn Technology Writer
This article was co-authored by How.com.vn staff writer, Darlene Antonelli, MA. Darlene Antonelli is a Technology Writer and Editor for How.com.vn. Darlene has experience teaching college courses, writing technology-related articles, and working hands-on in the technology field. She earned an MA in Writing from Rowan University in 2012 and wrote her thesis on online communities and the personalities curated in such communities. This article has been viewed 76,627 times.
How helpful is this?
Co-authors: 4
Updated: May 7, 2024
Views: 76,627
Article SummaryX

1. Close all programs you were working on and restart your computer.
2. Log into an administrator account.
3. Locate the corrupted file you want to delete.
4. Drag the corrupted file to the Recycle Bin.
5. Right-click the Recycle Bin icon.
6. Click Empty Recycle Bin.

Did this summary help you?

Thanks to all authors for creating a page that has been read 76,627 times.

Is this article up to date?

⚠️ Disclaimer:

Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

Notices:
  • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
  • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
  • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
  • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

Advertisement