This article provides a step-by-step guide on removing files that are typically stubborn to delete on your computer. In most cases, files that cannot be deleted are being used by a program or service. You can resolve this issue by booting your computer in Safe Mode, which stops most programs and services. If the file is corrupted or your computer reports that it cannot find the file, repairing the hard disk might fix the problem. For Android phones and tablets, third-party apps can be used to delete such files. However, this guide does not cover deleting system files, as doing so may cause your computer to malfunction.
Steps
Deleting Files in Safe Mode on Windows





Press the ⇧ Shift key while clicking on Restart. Your computer will restart as usual, but you should continue holding the Shift key until the next step.

Release the ⇧ Shift key when the blue screen appears. Once the blue screen is displayed, you can stop holding the Shift key and proceed to the next step.

Click on Troubleshoot. This option is located in the center of the screen, right next to the tools icon.

Select Advanced options. This choice is in the middle of the screen, right next to the icon with three horizontal lines and a checkmark.

Click on Startup Settings. This option is on the right side of the page, right next to the gear icon.

Click on Restart. This button is located at the bottom right corner of the screen.

Press the "Safe Mode" key. This key is usually the number
4. Check which number corresponds to "Enable Safe Mode" listed next to the "Startup Settings" menu.
- If the number 4 doesn't work, you can try pressing F4 (you might need to hold the Fn key while pressing F4).
⊞ Win+E

Locate the file you want to delete. Use File Explorer to open the folder containing the file you wish to remove. Double-click the folder to open it.

Select the file. Click once on the file to highlight it. The file will be shaded in blue.
- If there are multiple files, hold the "Ctrl" key and click to select each file.

Press the Del key. This action moves the file to the Recycle Bin.

Clear data from the Recycle Bin. After moving the files you want to delete to the Recycle Bin, you can permanently remove them from your computer by following these steps:
- Right-click on the Recycle Bin icon.
- Click on Empty Recycle Bin in the displayed menu.
- Click Yes when prompted.

Restart your computer. To exit Safe Mode, follow these steps:
- Click on Start.
- Click on Power.
- Click on Restart.
Using Command Prompt on Windows



Type cmd. You will see Command Prompt appear in the Start menu.

Run as administrator- You must log into an administrator account on Windows to use Command Prompt with administrator privileges.

Type cd/ and press ↵ Enter. This command returns you to the root directory in Command Prompt.
- If you need to switch drives in Command Prompt, simply type the drive letter followed by a colon (e.g., "D:").

Type cd followed by the file location and press ↵ Enter. This will navigate you to the folder containing the file. Use backslashes (\) to separate directories. For example: "cd users\username\documents\".
- To view a list of files and folders in a directory, type "dir" and press Enter.

Type del followed by the file name and press ↵ Enter. For example: "del testfile.txt". This command deletes the file.
- If the file name contains spaces (e.g., File Name.txt), enclose the name in quotes (e.g., "File Name.txt").
Repair Disk Errors on Windows

Close any open files. When repairing disk errors on Windows, it's best to close any open files (though not strictly necessary) to prevent further issues. Save your work and close programs by clicking the "X" icon in the top-right corner, or follow these steps to close programs in Task Manager:
- Press "Ctrl + Shift + Esc" to open Task Manager.
- Click on the open application.
- Click "End Task" in the bottom-right corner.
⊞ Win+E

Click on This PC. This option is in the left-hand menu of File Explorer. It is the option with a computer screen icon.

Right-click on your computer's hard drive. This is usually the
(C:) drive under the "Devices and drives" section. It may also be labeled "OS (C:)" or have your computer or drive name. Right-clicking opens a menu below it.
- You can double-click the "Devices and drives" header to expand it if you don't see any hard drives listed.
- If your computer has multiple hard drives, click on the one containing the file you want to delete.

Click on Properties in the displayed menu. A new window will appear immediately.

Click on the Tools tab. This tab is located at the top of the displayed window.

Click on Check. This option is found in the "Error Checking" section near the top of the window.

Click on Scan drive when prompted. This command instructs Windows to scan the hard drive for errors.
- If Windows detects errors, they will be automatically fixed if possible.

Begin scanning your computer. This process may take anywhere from a few minutes to several hours, depending on the size of the drive and the number of errors found.

Attempt to delete the file again. After resolving the hard drive issues, you can delete any files locked due to hard drive-related problems. Use File Explorer to locate the file and click to select it. Press the "
Del" key to delete the file.
- You may still need to use Safe Mode to delete the file if it is being used by another program or service.
- If you still cannot delete the file, it may be locked by another user or saved as a system file. You cannot delete files in these categories.
Deleting Files in Safe Mode on Mac.



Click on Restart…. This option is found in the menu displayed below the Apple icon.

Click on Restart when prompted. This command instructs your Mac to restart.

Press the ⇧ Shift key. You need to do this immediately after clicking Restart and hold it until the next step.

Release the ⇧ Shift key when the login window appears. This ensures your Mac boots into Safe Mode instead of the regular startup settings.



Navigate to the location of the file you want to delete. Use Finder to locate the folder containing the file you wish to remove. Double-click the folder to open it.

Select the file. Click once on the file you want to delete. The file will be highlighted in blue.
- If you want to delete multiple files, hold the "Command" key while clicking on each file.

Click on File at the top of the screen. A menu will appear immediately.

Click on Move to Trash. This option is in the displayed menu. The file will be moved to the Trash.

Empty the Trash. After moving the files to the Trash, you can permanently delete them from your Mac:
- Click and hold the Trash icon.
- Click on Empty Trash in the displayed menu.
- Click Empty when prompted.

Restart your Mac. To exit Safe Mode, follow these steps:
- Click on the Apple menu.
- Click on Restart....
- Click Restart when prompted.
Using Terminal on Mac and Linux.

Open Terminal. This is the program with a black screen icon and a text cursor. Follow these steps to open Terminal on Mac:
- Click on the magnifying glass icon in the top-right corner.
- Type Terminal into the search bar.
- Click on the Terminal icon.

Type cd and press ↵ Enter. This will take you to the root directory on your computer.

Type cd ~/ followed by the folder containing the file and press ↵ Enter. This will navigate you to the folder containing the file. Ensure you separate directories with a "/" and use the correct capitalization. For example: "cd ~/documents".
- You can also type "ls" and press Enter to view a list of folders and files in the current directory.

Type rm followed by a space and the filename, then press ↵ Enter. For example, "rm textfile.txt". This command deletes the file.
- If the filename contains spaces, enclose it in quotes (e.g., rm "text file.txt").

Type y and press ↵ Enter. If the file is write-protected, you’ll need to confirm the deletion. To confirm, type "y" and press
Enter.
- Alternatively, you can use "rm -f" followed by the filename to force deletion.
Repair Disk on Mac



Click on Restart…. This option is available in the displayed menu.

Click on Restart when prompted. This command instructs your Mac to restart.

Hold down the key combination ⌘ Command+R. Do this immediately after hearing the startup sound.

Release the keys when the Apple logo appears. The Recovery menu will then be displayed.
- The Recovery menu typically appears after a few minutes.

Click on Disk Utility. This option is located next to the hard drive icon with a stethoscope.

Click on Continue. This option is located in the bottom-right corner of the screen. The Disk Utility window will then open.

Click on View. This menu is located at the top of the screen. Another menu will then appear.

Click on Show All Devices. This option is available in the newly appeared menu. A list of available storage devices will be displayed on the left side of the screen.

Select your Mac's hard drive. This option is located in the left-hand menu bar.
- If your Mac has multiple drives, click on the one containing the files you want to delete.

Click on the First Aid icon. This tab features a stethoscope symbol at the top of the window.

Click on Run when prompted. This action commands Disk Utility to scan and repair your Mac's hard drive.

Delete files when prompted. If Disk Utility reports an "overlapped extent allocation" error (indicating two or more files are using the same portion of the hard drive), you will be asked to resolve the issue. In this case, you can delete any corrupted files listed. If you see the file you need to remove in this list, delete it before proceeding.

Restart your Mac. Once Disk Utility has completed its tasks, follow these steps to restart your Mac:
- Click on the Apple logo.
- Select Restart...
- Confirm by clicking Restart when prompted.

Attempt to delete the file again. After resolving any hard drive issues, you can delete files that were previously locked due to disk errors. Open Finder, locate the file, and click on it. Then, drag the file to the Trash to delete it.
- You may still need to use Safe Mode to delete the file if it is frequently used by a default program.
- If you still cannot delete the file, it may be locked by another user or is a system file. Files in these categories cannot be deleted.
Using SD Maid on Android

Download and install SD Maid. This is a system cleaning app for Android that helps you delete certain files that cannot be removed through the My Files app. However, some files on Android cannot and should not be deleted as they are part of the system or an application. Follow these steps to download SD Maid:
- Open Google Play Store.
- Type "SD Maid" in the search bar at the top.
- Tap Install under SD Maid.

Open SD Maid. This app features an Android robot icon dressed as a maid. Tap the icon on your home screen or app drawer, or tap Open in Google Play Store to launch SD Maid.

Tap on ☰ to open the menu. This three-line icon is located at the top-left corner. A menu will then appear on the screen.

Tap on Storage analyzer. This option is near the bottom of the list under "Tools" in the menu.


- When using this feature for the first time, you will be prompted to grant SD Maid access to internal storage and the SD card. If asked to allow SD Maid access to the system, tap Allow to proceed.

Tap on the folder containing the file you want to delete. The folder labeled "Primary" refers to the device's internal storage, while "Secondary" refers to the SD card. Simply tap the folder where the file is located.

Locate the file you need to delete. Tap on the folder to open it. App files are usually stored in folders named after the app. Photos are often found in the "DCIM" or "Pictures" folder. Files downloaded from the internet are stored in "Download," and other files can be found in the "Documents" folder.

Tap and hold the file or folder you want to delete. The file will be selected after this action. A toolbar will appear at the top of the screen.

Tap on the trash bin icon. This option is located at the top-right corner of the app. The file will be deleted.
- After deleting a file in SD Maid, verify its removal in the My Files or Files app. If the file persists, try deleting it again in SD Maid. You can still delete the file after removing it with SD Maid.

Back up and reset your Android phone or tablet. Unfortunately, there is no universal solution for all Android scenarios. If you cannot delete the file, back up your device and
reset it. You can restore your Android device from the backup during the initial setup. Only proceed with this step if all other methods have failed and the file must be deleted.
Tips- Safe Mode disables most programs and services on your computer to ensure processes like deleting stubborn files are not interrupted.
- System files, such as DLL files on Windows, are essential for basic functions and the computer's operation.
Warning- Deleting system files will cause your computer to malfunction, requiring you to reinstall the operating system or purchase a new computer.