This wikiHow teaches you how to delete non-deletable files on your computer. In most cases, the file cannot be deleted because it is being used by a program or service. To work around this problem, you can run the computer in Safe Mode to prevent programs and services that use the file from running. If the file is corrupt or the computer reports that it cannot be found, you may be able to resolve this by fixing disk errors on the hard disk (hard disk). If you're using an Android device, you can delete files on your tablet or phone using a third-party app. Remember, this article is not about deleting system files because this can cause your computer to malfunction (even crash).
Step
Method 1 of 7: Deleting Files in Safe Mode on Windows
Step 1. Click Start
The button with the Windows logo is in the lower-left corner. The Start menu will be displayed.
Step 2. Click Power
It's in the lower-left corner of the Start menu. This will bring up a pop-up menu.
Step 3. Hold down Shift. key while clicking Restart.
The computer will restart as usual, but do not disconnect Shift until the next step.
Step 4. Release the Shift key when the blue screen appears
If the blue screen already appears, release it Shift and continue the process.
Step 5. Click Troubleshoot
It's in the center of the screen next to the tool-shaped icon.
Step 6. Click on Advanced options
This option can be found in the center of the screen next to the 3-line icon next to the check mark.
Step 7. Click Startup Settings
You'll find it on the right side of the page next to the gear icon.
Step 8. Click on Restart located at the bottom right corner
Step 9. Press the "Safe Mode" button
Commonly used buttons are
Step 4.. Check the number you have to press in "Enable Safe Mode" which is next to the "Startup Settings" menu.
-
If the button
Step 4. does nothing, try pressing F4 (maybe you have to hold down the button Fn while pressing F4).
Step 10. Open File Explorer
by pressing the button Win+E.
Open File Explorer after Windows enters Safe Mode.
Step 11. Locate the file you want to delete
Use File Explorer to browse to the folder containing the file you want to delete. Open the folder by double-clicking on it.
Step 12. Select the file
Select the desired file by clicking on it once. The file will be highlighted in blue.
If you want to delete multiple files, hold down the " Ctrl " and click the desired files.
Step 13. Press Del
Doing so will move the file to the Recycle Bin.
If the selected file still doesn't delete, you may need to repair your computer's hard drive before trying to delete it again
Step 14. Empty the Recycle Bin
Once the files are moved to the Recycle Bin, you can permanently delete them from your computer. How to do it:
- Right-click the Recycle Bin icon.
- choose Empty Recycle Bin in the drop-down menu that appears.
- Click Yes when requested.
Step 15. Restart the computer
Exit Safe Mode by performing the following steps:
- Click Start.
- Click Power.
- Click Restart.
Method 2 of 7: Using Command Prompt on Windows
Step 1. Click Start
This Windows logo-shaped icon is by default placed in the lower-left corner of the screen.
Step 2. Type cmd
The Command Prompt option will appear in the Start menu.
Step 3. Right-click Command Prompt
then click Run as administrator.
Doing so will allow you to run Command Prompt as administrator.
To run the Command Prompt as an administrator, you must be signed in to the Administrative account on Windows
Step 4. Type cd/ and press Enter key
The Command Prompt screen will display the root directory again.
If you want to change the drive in the Command Prompt, type the drive letter and follow it with a colon (eg "D:")
Step 5. Type cd/ followed by the file location, then press Enter
This will direct you to the folder where the file is saved. Put a "\" to separate each folder. For example, you could write "cd users\username\documents\".
To see a list of files and folders in a directory, type " dir " and press the button Enter.
Step 6. Type del followed by the file name, then press Enter
For example, write " del file.txt ". Doing so will delete the file.
If there are spaces in the file name (e.g. Important File.txt), put quotation marks in the file name (e.g. del "Important File.txt")
Method 3 of 7: Fix Disk Error on Windows
Step 1. Close all open files
When troubleshooting disk errors in Windows, it's a good idea (though not mandatory) to close all open files to prevent further problems from occurring. Don't forget to save all work and close the program by clicking the "X" icon in the top right. You can also close the program via the Task Manager:
- Open Task Manager by pressing " Ctrl + Shift + Esc ".
- Click the program that is still open.
- Click "End Task" in the lower right corner.
Step 2. Open File Explorer
by pressing Win+E.
The File Explorer icon is a folder with a blue pin.
Step 3. Click This PC
You can find it in the sidebar menu on the left side of File Explorer. The icon is a computer monitor.
Step 4. Right-click the computer hard disk
This is usually indicated by the letter (C:) under the "Devices and drives" heading. The name displayed may be "OS (C:)", the name of the computer, or the name of the drive. By right-clicking, a drop-down menu will be displayed.
- You can double-click the "Devices and drives" heading to expand it if no hard drive is shown there.
- If there is more than 1 hard drive on your computer, click the hard drive that contains the files that you want to delete.
Step 5. Click Properties in the drop-down menu
This will bring up a pop-up window.
Step 6. Click Tools
This tab is located at the top of the pop-up window.
Step 7. Click Check
You'll find it at the top of the window, in the box that says "Error Checking".
Step 8. Click Scan drive when prompted
Doing so will scan your hard disk for errors (errors).
If it finds an error, Windows will fix it automatically (if possible)
Step 9. Let the scan run
This could take a few minutes or hours depending on the size of the hard disk selected and the number of errors.
Step 10. Try deleting the file again
After fixing the errors on your hard drive, you should now be able to delete any files that were locked due to hard drive issues. Browse to the file using File Explorer and select the file by clicking on it. Delete the desired file by pressing Del ".
- If the file is used by a program or service, you may still need to use Safe Mode to delete it.
- If you still can't delete it, it's most likely locked by another user or backed up as a system file. If this happens, you will not be able to delete the file.
Method 4 of 7: Deleting Files in Safe Mode on Mac
Step 1. Open Apple menu
The icon is in the shape of the Apple logo, and can be found in the upper-left corner of the menu bar (menu bar). A drop-down menu will be displayed.
Step 2. Click Restart… in the drop-down menu, below the Apple icon
Step 3. Click Restart when prompted
The Mac computer will restart.
Step 4. Press and hold the Shift key
Do this as soon as you click Restart, and do not release the button until the next step.
Step 5. Release Shift when the login window appears
This way, your Mac will run in Safe Mode, not in the usual boot settings.
Step 6. Open Finder
The icon is a smiling face in blue and white. This icon can be found in the Dock at the bottom of the screen.
Step 7. Navigate to the file you want to delete
Use the Finder to open the folder containing the file you want to delete. Open the folder by double-clicking on it.
Step 8. Select the desired file
Single-click the file you want to delete. The file will be highlighted in blue.
If you want to delete multiple files in the same folder, press and hold the " Command " while clicking each file you want to delete.
Step 9. Click File at the top of the screen
A drop-down menu will be displayed.
Step 10. Click Move to Trash
This button is in the drop-down menu. The file you selected will be moved to the Trash.
If the files still can't be deleted, you may need to repair your Mac's hard drive and try deleting it again later
Step 11. Empty Trash
Once the files you want are moved to the Trash, you can permanently delete them from your Mac:
- Click and hold the Trash icon.
- Click Empty Trash in the menu that appears.
- Click Empty when requested.
Step 12. Restart the Mac computer
Exit Safe Mode by performing the following steps:
- Click Apple menu.
- Click Restart….
- Click Restart when requested.
Method 5 of 7: Using Terminal on Mac and Linux Computers
Step 1. Open Terminal
The icon is a black screen with a text cursor inside. Open Terminal on a Mac computer by performing these steps:
- Click the magnifying glass icon in the top right corner.
- Type Terminal in the search field.
- Click the Terminal icon.
Step 2. Type cd and press Enter key
The computer screen will display the root directory.
Step 3. Type cd ~/ followed by the file location, then press Enter
This will direct you to the folder containing the desired file. Separate each folder with a "/" sign. Make sure you've used upper and lower case correctly, for example "cd ~/documents".
You can also type "ls" and press Enter to bring up a list of folders and files in the current directory.
Step 4. Type rm followed by a space and the file name, then press Enter
For example, write "rm myfile.txt". Doing so will delete the file.
If there are spaces in the file name, put quotes around the file name (e.g. rm "important file.txt")
Step 5. Type y and press Enter key
If the file is write-protected, confirm that you really want to delete it. Confirm by typing "y" and pressing Enter.
Alternatively, you can type "rm -f" followed by the file name to forcibly delete the file
Method 6 of 7: Fix Disk Error on Mac
Step 1. Open Apple menu
Click the Apple logo in the upper-left corner of the screen to bring up the drop-down menu.
Step 2. Click Restart… in the drop-down menu
Step 3. Click Restart when prompted
The Mac computer will restart.
Step 4. Press and hold the Command+R key
You should do this as soon as the computer makes a Startup sound.
Step 5. Release the buttons when the Apple logo appears
The computer will load the Recovery menu.
The computer may take a few minutes to bring up the Recovery menu
Step 6. Click Disk Utility
This option is next to the hard disk and stethoscope-shaped icons.
Step 7. Click Continue
You can find it in the lower right corner. The Disk Utility window will open.
Step 8. Click View at the top of the screen
A drop-down menu will be displayed.
Step 9. Click Show All Devices in the drop-down menu
Your computer will show you a list of Mac storage locations on the left side of the screen.
Step 10. Select the Mac hard drive
You can find it in the sidebar menu on the left side.
If there is more than 1 hard drive on your Mac, click the hard drive where you want to delete the files
Step 11. Click the First Aid icon
This stethoscope-shaped tab is at the top of the window.
Step 12. Click Run when prompted
Disk Utility will start scanning and repairing your Mac's hard drive.
Step 13. Delete the file if prompted
If Disk Utility reports an error that says "overlapped extent allocation", you will be prompted to take action. In this case, you can delete the corrupted or corrupted files in the associated list. If the file you want to delete is in the list, delete it before continuing.
Step 14. Restart the Mac computer
Once Disk Utility has done its job, restart your Mac by performing the steps below:
- Click the Apple icon.
- Click Restart….
- Click Restart when requested.
Step 15. Try deleting the file again
After fixing the hard drive issue, you should now be able to delete files that were locked due to a hard drive error. Launch Finder and navigate to the desired file, then click on it. Next, delete the file by dragging it to the Trash.
- You may still have to use Safe Mode to delete it if the file is frequently used by default programs.
- If the file still can't be deleted, it's most likely locked by another user or backed up as a system file. If this happens, you will not be able to delete it.
Method 7 of 7: Using SD Maid on Android
Step 1. Download and install SD Maid
This is a system cleaner app for Android devices. With this application, you can delete files that cannot be deleted through the My Files application. Note that some files on Android cannot and should not be deleted because they are used in the root system or in certain applications. Download SD Maid by doing the following steps:
- Open the Play Store.
- Type "SD Maid" into the search field at the top of the screen.
- Touch Install under SD Maid.
Step 2. Open SD Maid
The icon is an Android robot wearing a maid uniform. Touch the icon on the home screen or application menu. You can also run SD Maid by touching Open on the Play Store.
Step 3. Touch to open the menu
It's an icon with 3 horizontal lines in the upper-left corner of the screen. This will open the menu.
Step 4. Touch Storage analyzer
You can find it at the bottom of the list of options under "Tools" in the menu.
Step 5. Touch the icon
It's a green button with a circular arrow in the lower-right corner of the screen. This will search for the file system on the Android device.
The first time you use this feature, you may be asked to allow SD Maid to access the SD card and internal storage on the device. If you did allow SD Maid to access the system, touch Allow to continue the process.
Step 6. Touch the drive where the file you want to delete is stored
The public storage drive labeled "Primary" is the internal storage location for the Android device, while the public storage on the SD card is labeled "Secondary". Touch the repository containing the file you want to delete.
Step 7. Navigate to the file you want to delete
Open the storage folder by touching it. Files associated with a particular application are generally placed in a folder with the same name as the application. The images will be placed in the "DCIM" or "Pictures" folder. Internet download files can be found under "Downloads", and random files are usually placed in the "Documents" folder.
Step 8. Touch and hold the file or folder you want to delete
This will select the file/folder. A bar will be displayed at the top of the screen.
Step 9. Touch the trash can icon
You can find it in the top right corner of the app. Doing so will delete the selected file.
After deleting files in SD Maid, it's a good idea to also check the My Files or Files app to see if they've been deleted there too. If it hasn't been deleted, try deleting it using the SD Maid app. You may be able to delete it after deleting the file via SD Maid
Step 10. Backup and reset Android device
Unfortunately, this solution cannot give the same result on all Android devices. If the files can't be deleted, try backing up your Android phone/tablet, then do a reset. You can restore your Android device from a backup during the initial setup process. Only do this as a last resort, and if you really want to delete the file.
Tips
- Safe Mode will disable almost all programs and services on your computer so that the process of deleting stubborn files will not be interrupted.
- Files used for the system (such as DLL files in Windows) are responsible for the appearance and basic functions of the computer.