How to Delete Files That Cannot Be Deleted

This wikiHow teaches you how to delete regular files that you can't seem to delete on your computer. Most of the time, files you can't delete are being used by a program or a service; you can start your computer in Safe Mode to prevent the...
Method 1 of 7:

Deleting Files in Safe Mode on Windows

  1. How to Delete Files That Cannot Be Deleted Picture 1How to Delete Files That Cannot Be Deleted Picture 1
    Click the Start button
    How to Delete Files That Cannot Be Deleted Picture 2How to Delete Files That Cannot Be Deleted Picture 2
    . It's the button with the Windows logo in the bottom-left corner of the screen. The Start menu will pop up.
  2. How to Delete Files That Cannot Be Deleted Picture 3How to Delete Files That Cannot Be Deleted Picture 3
    Click Power
    How to Delete Files That Cannot Be Deleted Picture 4How to Delete Files That Cannot Be Deleted Picture 4
    . It's in the bottom-left corner of the Start menu. A pop-up menu will appear.
  3. How to Delete Files That Cannot Be Deleted Picture 5How to Delete Files That Cannot Be Deleted Picture 5
    Hold down Shift while clicking Restart. Your computer will begin to restart like usual, but don't release the Shift key until the next step.
  4. How to Delete Files That Cannot Be Deleted Picture 6How to Delete Files That Cannot Be Deleted Picture 6
    Release Shift when the blue screen appears. Once the blue screen appears, you can release the Shift key and proceed.
  5. How to Delete Files That Cannot Be Deleted Picture 7How to Delete Files That Cannot Be Deleted Picture 7
    Click Troubleshoot. It's in the middle of the screen next to an icon that resembles tools.
  6. How to Delete Files That Cannot Be Deleted Picture 8How to Delete Files That Cannot Be Deleted Picture 8
    Click Advanced options. You'll find this in the middle of the screen next to an icon with three lines next to checkmarks.
  7. How to Delete Files That Cannot Be Deleted Picture 9How to Delete Files That Cannot Be Deleted Picture 9
    Click Startup Settings. This option is on the right side of the page next to an icon that resembles a gear.
  8. How to Delete Files That Cannot Be Deleted Picture 10How to Delete Files That Cannot Be Deleted Picture 10
    Click Restart. It's the button in the lower-right corner of the screen.
  9. How to Delete Files That Cannot Be Deleted Picture 11How to Delete Files That Cannot Be Deleted Picture 11
    Press the "Safe Mode" key. This key is usually 4. Check which number "Enable Safe Mode" is listed next to in the "Startup Settings" menu.
    1. If 4 doesn't work, try pressing F4 (you may need to hold down Fn while pressing F4).[1]
  10. How to Delete Files That Cannot Be Deleted Picture 12How to Delete Files That Cannot Be Deleted Picture 12
    Press Win+E to open File Explorer
    How to Delete Files That Cannot Be Deleted Picture 13How to Delete Files That Cannot Be Deleted Picture 13
    . Once Windows boots up in Safe Mode, open File Explorer.
  11. How to Delete Files That Cannot Be Deleted Picture 14How to Delete Files That Cannot Be Deleted Picture 14
    Find the file you want to delete. Use File Explorer to navigate to the folder that contains the file that you want to delete. Double-click a folder to open it.
  12. How to Delete Files That Cannot Be Deleted Picture 15How to Delete Files That Cannot Be Deleted Picture 15
    Select the file. Click once the file to select it. This will highlight it in blue.
    1. If there are multiple files hold "Ctrl" and click them to select multiple files.
  13. How to Delete Files That Cannot Be Deleted Picture 16How to Delete Files That Cannot Be Deleted Picture 16
    Press the Del key. Doing so will move the file into the Recycle Bin.
    1. If you're still unable to delete the selected files, you may need to repair your PC's hard drive before attempting to delete the files again.
  14. How to Delete Files That Cannot Be Deleted Picture 17How to Delete Files That Cannot Be Deleted Picture 17
    Empty the Recycle Bin. Once you've moved the correct files into the Recycle Bin, you can proceed with removing them from your PC for good:
    1. Right-click the Recycle Bin icon.
    2. Click Empty Recycle Bin in the resulting drop-down menu.
    3. Click Yes when prompted.
  15. How to Delete Files That Cannot Be Deleted Picture 18How to Delete Files That Cannot Be Deleted Picture 18
    Restart your computer. Do the following to exit Safe Mode:
    1. Click Start.
    2. Click Power.
    3. Click Restart.
Method 2 of 7:

Using the Command Prompt on Windows

  1. How to Delete Files That Cannot Be Deleted Picture 19How to Delete Files That Cannot Be Deleted Picture 19
    Click the Windows Start menu
    How to Delete Files That Cannot Be Deleted Picture 20How to Delete Files That Cannot Be Deleted Picture 20
    . It's the icon with the windows logo. By default, it's in the lower-left corner.
  2. How to Delete Files That Cannot Be Deleted Picture 21How to Delete Files That Cannot Be Deleted Picture 21
    Type cmd. This displays the Command Prompt in the Windows Start menu. |
  3. How to Delete Files That Cannot Be Deleted Picture 22How to Delete Files That Cannot Be Deleted Picture 22
    Right-click the Command Prompt
    How to Delete Files That Cannot Be Deleted Picture 23How to Delete Files That Cannot Be Deleted Picture 23
    and click Run as administrator. This opens the Command Prompt with administrative privileges.
    1. You must be signed in to an Administrative account on Windows to run the Command Prompt as an administrator.
  4. How to Delete Files That Cannot Be Deleted Picture 24How to Delete Files That Cannot Be Deleted Picture 24
    Type cd/ and press Enter. This command returns you to your root directory in the Command Prompt.
    1. If you to need to change drives in the command prompt, simply type the drive letter followed by a colon (i.e. "D:")
  5. How to Delete Files That Cannot Be Deleted Picture 25How to Delete Files That Cannot Be Deleted Picture 25
    Type cd followed by the file location and press Enter. This navigates to the folder the file is located in. Separate each folder with a "". For example "cd usersusernamedocuments".
    1. To see a list of files and folders in a directory, type "dir" and press Enter.
  6. How to Delete Files That Cannot Be Deleted Picture 26How to Delete Files That Cannot Be Deleted Picture 26
    Type del followed by the file name and press Enter. For example, "del testfile.txt". This deletes the file.[2]
    1. If the file name has spaces in it (i.e. File Name.txt") place the file name in quotations (i.e. del "File Name.txt")
Method 3 of 7:

Repairing Disk Errors on Windows

  1. How to Delete Files That Cannot Be Deleted Picture 27How to Delete Files That Cannot Be Deleted Picture 27
    Close any open files. When repairing disk errors on Windows, it's wise (though not strictly necessary) to close any open files to prevent further issues. Be sure to save any work you have and close a program by click the "X" icon in the upper-right corner, or use the following steps to close programs in the Task Manager:
    1. Press "Ctrl + Shift + Esc" to open the Task Manager.
    2. Click an app that is open.
    3. Click "End Task' in the lower-right corner.
  2. How to Delete Files That Cannot Be Deleted Picture 28How to Delete Files That Cannot Be Deleted Picture 28
    Press Win+E to open File Explorer
    How to Delete Files That Cannot Be Deleted Picture 29How to Delete Files That Cannot Be Deleted Picture 29
    . File Explorer has an icon that resembles a folder with a blue clip.
  3. How to Delete Files That Cannot Be Deleted Picture 30How to Delete Files That Cannot Be Deleted Picture 30
    Click This PC. It's in the sidebar menu to the left in File Explorer. It has an icon that resembles a computer monitor.
  4. How to Delete Files That Cannot Be Deleted Picture 31How to Delete Files That Cannot Be Deleted Picture 31
    Right-clck your computer's hard drive. It's usually the one marked (C:), below the "Devices and drives" heading. It may be named "OS (C:)" or have your computer name or drive name. Right-clicking it will display a drop-down menu below it.
    1. You can double-click the "Devices and drives" heading to expand it if you don't see any hard drives listed there.
    2. If your computer has more than one hard drive, click the hard drive on which the file you want to delete is stored.
  5. How to Delete Files That Cannot Be Deleted Picture 32How to Delete Files That Cannot Be Deleted Picture 32
    Click Properties. It's in the drop-down menu. A pop-up window will open.
  6. How to Delete Files That Cannot Be Deleted Picture 33How to Delete Files That Cannot Be Deleted Picture 33
    Click the Tools tab. This is at the top of the pop-up window.
  7. How to Delete Files That Cannot Be Deleted Picture 34How to Delete Files That Cannot Be Deleted Picture 34
    Click Check. It's near the top of the window in the box labeled "Error Checking".
  8. How to Delete Files That Cannot Be Deleted Picture 35How to Delete Files That Cannot Be Deleted Picture 35
    Click Scan drive when prompted. Doing so allows Windows to begin scanning your hard drive for errors.
    1. If Windows finds any errors, they will be repaired automatically if possible.
  9. How to Delete Files That Cannot Be Deleted Picture 36How to Delete Files That Cannot Be Deleted Picture 36
    Allow the scan to run. This can take several minutes to several hours depending on your selected hard drive's size and number of errors.
  10. How to Delete Files That Cannot Be Deleted Picture 37How to Delete Files That Cannot Be Deleted Picture 37
    Try deleting your file again. Now that you've repaired any issues with your hard drive, you should be able to delete any files which were locked due to hard drive issues. Use File Explorer to navigate to the file and click it to select it. Press the "Del" key to delete it.
    1. You may still have to use Safe Mode to delete your file if the file is being used by a program or service.
    2. If you still can't delete the file in question, the file is most likely either locked by another user or reserved as a system file. Either way, you won't be able to delete the file.
Method 4 of 7:

Deleting Files in Safe Mode on Mac

  1. How to Delete Files That Cannot Be Deleted Picture 38How to Delete Files That Cannot Be Deleted Picture 38
    Open the Apple menu
    How to Delete Files That Cannot Be Deleted Picture 39How to Delete Files That Cannot Be Deleted Picture 39
    . It's the icon with the Apple logo in the top-left corner of the screen in the menu bar. A drop-down menu will appear.
  2. How to Delete Files That Cannot Be Deleted Picture 40How to Delete Files That Cannot Be Deleted Picture 40
    Click Restart…. It's in the drop-down menu below the Apple icon.
  3. How to Delete Files That Cannot Be Deleted Picture 41How to Delete Files That Cannot Be Deleted Picture 41
    Click Restart when prompted. Doing so causes your Mac to begin restarting.
  4. How to Delete Files That Cannot Be Deleted Picture 42How to Delete Files That Cannot Be Deleted Picture 42
    Hold down the Shift key. Make sure you do this immediately after clicking Restart, and don't stop until the next step.
  5. How to Delete Files That Cannot Be Deleted Picture 43How to Delete Files That Cannot Be Deleted Picture 43
    Release the Shift key at the login window. This ensures that your Mac starts in Safe Mode rather than using regular boot settings.[3]
  6. How to Delete Files That Cannot Be Deleted Picture 44How to Delete Files That Cannot Be Deleted Picture 44
    Open the Finder
    How to Delete Files That Cannot Be Deleted Picture 45How to Delete Files That Cannot Be Deleted Picture 45
    . It's the icon that has a blue and white smiley face. You can find it in the Dock at the bottom of your screen.
  7. How to Delete Files That Cannot Be Deleted Picture 46How to Delete Files That Cannot Be Deleted Picture 46
    Navigate to the file you want to delete. Use the Finder to navigate to the folder containing the file you want to delete. Double-click the folder to open it.
  8. How to Delete Files That Cannot Be Deleted Picture 47How to Delete Files That Cannot Be Deleted Picture 47
    Select the file. Click once the file you want to delete. This highlights the file in blue
    1. If there are multiple files you want to delete from one location, you can hold down "Command" while clicking each file you want to delete.
  9. How to Delete Files That Cannot Be Deleted Picture 48How to Delete Files That Cannot Be Deleted Picture 48
    Click File. It's at the top of the screen. A drop-down menu will appear.
  10. How to Delete Files That Cannot Be Deleted Picture 49How to Delete Files That Cannot Be Deleted Picture 49
    Click Move to Trash. This is in the drop-down menu. Doing so should move the files to the Trash.
    1. If you're still unable to delete the selected files, you may need to repair your Mac's hard drive before attempting to delete the files again.
  11. How to Delete Files That Cannot Be Deleted Picture 50How to Delete Files That Cannot Be Deleted Picture 50
    Empty the Trash. Once you've moved the correct files into the Trash, you can proceed with removing them from your Mac for good:
    1. Click and hold the Trash app icon.
    2. Click Empty Trash in the resulting menu.
    3. Click Empty when prompted.
  12. How to Delete Files That Cannot Be Deleted Picture 51How to Delete Files That Cannot Be Deleted Picture 51
    Restart your Mac. Do the following to exit Safe Mode:
    1. Click the Apple menu.
    2. Click Restart....
    3. Click Restart when prompted.
Method 5 of 7:

Using The Terminal on Mac and Linux

  1. How to Delete Files That Cannot Be Deleted Picture 52How to Delete Files That Cannot Be Deleted Picture 52
    Open the Terminal. The Terminal has an icon that resembles a black screen with a text cursor. Use the following steps to open the Terminal on Mac:
    1. Click the Magnifying Glass icon in the upper-right corner.
    2. Type Terminal in the search bar.
    3. Click the Terminal icon.
  2. How to Delete Files That Cannot Be Deleted Picture 53How to Delete Files That Cannot Be Deleted Picture 53
    Type cd and press Enter. This navigates to the root directory on your computer.[4]
  3. How to Delete Files That Cannot Be Deleted Picture 54How to Delete Files That Cannot Be Deleted Picture 54
    Type cd ~/ followed by the file location and press Enter. This navigates to the folder(s) the file is located in. Be sure to separate each folder with a "/". Make sure you use the correct capitalization. For example, "cd ~/documents"
    1. You can also type "ls" and press Enter to see a list of folders and files in the current directory.
  4. How to Delete Files That Cannot Be Deleted Picture 55How to Delete Files That Cannot Be Deleted Picture 55
    Type rm followed by a space and the file name and press Enter. For example, "rm textfile.txt". This deletes the file.
    1. If the file name has spaces in it, place the file name in quotations (i.e rm "text file.txt")
  5. How to Delete Files That Cannot Be Deleted Picture 56How to Delete Files That Cannot Be Deleted Picture 56
    Type y and press Enter. If the file is write-protected, you will need to confirm that you want to delete the file. To confirm, type "y" and press Enter. [5]
    1. Alternatively, you can type "rm -f" followed by the file name to force delete the file name.
Method 6 of 7:

Repairing Disk Errors on Mac

  1. How to Delete Files That Cannot Be Deleted Picture 57How to Delete Files That Cannot Be Deleted Picture 57
    Open the Apple menu
    How to Delete Files That Cannot Be Deleted Picture 58How to Delete Files That Cannot Be Deleted Picture 58
    . Click the Apple logo in the top-left corner of the screen. A drop-down menu will appear.
  2. How to Delete Files That Cannot Be Deleted Picture 59How to Delete Files That Cannot Be Deleted Picture 59
    Click Restart…. It's in the drop-down menu.
  3. How to Delete Files That Cannot Be Deleted Picture 60How to Delete Files That Cannot Be Deleted Picture 60
    Click Restart when prompted. Doing so causes your Mac to begin restarting.
  4. How to Delete Files That Cannot Be Deleted Picture 61How to Delete Files That Cannot Be Deleted Picture 61
    Hold down the Command+R keys. Do this immediately after hearing the Startup chime.
  5. How to Delete Files That Cannot Be Deleted Picture 62How to Delete Files That Cannot Be Deleted Picture 62
    Release the keys when the Apple logo appears. This loads the Recovery menu.
    1. The Recovery menu may take a few minutes to appear.
  6. How to Delete Files That Cannot Be Deleted Picture 63How to Delete Files That Cannot Be Deleted Picture 63
    Click Disk Utility. It's next to an icon that resembles a hard disk drive with a stethoscope.
  7. How to Delete Files That Cannot Be Deleted Picture 64How to Delete Files That Cannot Be Deleted Picture 64
    Click Continue. This is in the lower-right corner of the screen. The Disk Utility window will open.
  8. How to Delete Files That Cannot Be Deleted Picture 65How to Delete Files That Cannot Be Deleted Picture 65
    Click View. It's a menu item at the top of the screen. A drop-down menu will appear.
  9. How to Delete Files That Cannot Be Deleted Picture 66How to Delete Files That Cannot Be Deleted Picture 66
    Click Show All Devices. This is in the drop-down menu. You should see a list of your Mac's available storage locations appear on the left side of the screen.
  10. How to Delete Files That Cannot Be Deleted Picture 67How to Delete Files That Cannot Be Deleted Picture 67
    Select your Mac's hard drive. It's in the sidebar menu to the left.
    1. If your Mac has more than one hard drive, make sure you click the one on which the file you want to delete is stored.
  11. How to Delete Files That Cannot Be Deleted Picture 68How to Delete Files That Cannot Be Deleted Picture 68
    Click the First Aid icon. It's a tab which resembles a stethoscope at the top of the window.[6]
  12. How to Delete Files That Cannot Be Deleted Picture 69How to Delete Files That Cannot Be Deleted Picture 69
    Click Run when prompted. Doing so allows Disk Utility to begin scanning and repairing your Mac's hard drive.
  13. How to Delete Files That Cannot Be Deleted Picture 70How to Delete Files That Cannot Be Deleted Picture 70
    Delete files if asked. If Disk Utility reports an "overlapped extent allocation" error, you will be asked to take action; in this case, you can delete any damaged or corrupted files in a related list. If you see the file you want to delete in this list, do so before proceeding.
  14. How to Delete Files That Cannot Be Deleted Picture 71How to Delete Files That Cannot Be Deleted Picture 71
    Restart your Mac. Once Disk Utility finishes running, you can use the following steps to restart your Mac:
    1. Click the Apple Icon.
    2. Click Restart...
    3. Click Restart when prompted.
  15. How to Delete Files That Cannot Be Deleted Picture 72How to Delete Files That Cannot Be Deleted Picture 72
    Try deleting the file again. Now that you've repaired any issues with your hard drive, you should be able to delete any files which were locked due to hard drive issues. Open the Finder and navigate to the file and click it. Then drag it to the Trash to delete it.
    1. You may still need to use Safe Mode to delete the file if it's used frequently by a default program.
    2. If you still can't delete the file in question, the file is most likely either locked by another user or reserved as a system file. Either way, you won't be able to delete the file.
Method 7 of 7:

Using SD Maid on Android

  1. How to Delete Files That Cannot Be Deleted Picture 73How to Delete Files That Cannot Be Deleted Picture 73
    Download and install SD Maid. SD Maid is a system cleaning app for Android. It can help you delete some files that you cannot delete in the My Files app. Be aware that some files on Android can't and shouldn't be deleted because they are part of the root system or a specific app. Use the following steps to download SD Maid:
    1. Open the Google Play Store.
    2. Type "SD Maid" in the search bar at the top.
    3. Tap Install below SD Maid.
  2. How to Delete Files That Cannot Be Deleted Picture 74How to Delete Files That Cannot Be Deleted Picture 74
    Open SD Maid. SD Maid has an icon that resembles the Android robot wearing a maid's uniform. Tap the icon on your home screen or apps menu or tap Open in the Google Play Store to open SD Maid.
  3. How to Delete Files That Cannot Be Deleted Picture 75How to Delete Files That Cannot Be Deleted Picture 75
    Tap to open the menu. The icon with the three horizontal lines is in the upper-left corner. This opens the menu.
  4. How to Delete Files That Cannot Be Deleted Picture 76How to Delete Files That Cannot Be Deleted Picture 76
    Tap Storage analyzer. It's near the bottom of the list of options below "Tools" in the menu.
  5. How to Delete Files That Cannot Be Deleted Picture 77How to Delete Files That Cannot Be Deleted Picture 77
    Tap the
    How to Delete Files That Cannot Be Deleted Picture 78How to Delete Files That Cannot Be Deleted Picture 78
    icon. It's the green button with a circular arrow in the lower-right corner. This searches your file system on your Android device.
    1. The first time you use this feature, you may be asked to grant SD Maid permissions to access your internal storage and SD card. If you receive a prompt asking if you would like to allow SD Maid to access your system, tap Allow to continue.
  6. How to Delete Files That Cannot Be Deleted Picture 79How to Delete Files That Cannot Be Deleted Picture 79
    Tap the storage drive with the file you want to delete. The public storage drive labeled "Primary" is the internal storage for your phone or tablet. The public storage labeled "Secondary" is the SD card. Tap the storage that contains the file you want to delete.
  7. How to Delete Files That Cannot Be Deleted Picture 80How to Delete Files That Cannot Be Deleted Picture 80
    Navigate to the file you want to delete. Tap the folders on the screen to open the folder. Files associated with a specific app are usually in a folder with the app's name. Pictures can be found in a folder called "DCIM" or "Pictures". Files downloaded from the internet can be found in "Download" and random files can be found in the "Documents" folder.
  8. How to Delete Files That Cannot Be Deleted Picture 81How to Delete Files That Cannot Be Deleted Picture 81
    Tap and hold the file or folder you want to delete. This selects the item. A bar will appear at the top of the screen.
  9. How to Delete Files That Cannot Be Deleted Picture 82How to Delete Files That Cannot Be Deleted Picture 82
    Tap the trashcan item. It's in the upper-right corner of the app. This deletes the file.
    1. After deleting the file in SD Maid, you may want to check to make sure it is deleted in the My Files or Files app. If it hasn't been deleted, try deleting it in the SD Maid app. You may be able to delete it after removing it using SD Maid. [7]
  10. How to Delete Files That Cannot Be Deleted Picture 83How to Delete Files That Cannot Be Deleted Picture 83
    Back up and reset your Android phone or tablet. Unfortunately, no solution is going to work in every instance on Android. If you cannot delete a file, you can try to back up your Android phone or tablet, and then reset it. You can restore your Android phone from the backup during the initial setup process. This should only be done as a last resort, and only if you really need to get rid of the file.
4 ★ | 1 Vote