How to Force Delete a File/Folder That Won’t Delete on Mac
In general, you can drag the file/folder to the Trash in the Dock to easily delete it. Or you can select the item and press the Command + Delete shortcut to remove it on your Mac. However, if you can’t delete a file or folder on your Mac in normal ways, you can check below for how to force delete a file that won’t delete on your Mac.
1. Force Delete a File on Mac with Keyboard Shortcut
You can select the target file or folder and press the Option + Command + Delete keyboard shortcut to permanently delete the file/folder on your Mac.
2. How to Force Delete a File/Folder on Mac with Terminal
- Open Spotlight Search on Mac.
- Search for “Terminal” to open Terminal on Mac.
- In Terminal, type the command “
rm -f
“ if you want to force delete a file on Mac. Type the command “rm -rf
“ if you want to force delete a folder on Mac. Remember to add a space after the command. Do not press Enter now. - Go to find the file or folder that you want to delete. Drag the file/folder into the Terminal window and it will add the file/folder name and path after the command you type beforehand.
- Press Enter to force delete the file/folder.
3. Unlock the File First and Delete It Again
- If the file is locked, then you can’t delete it. You can right-click the file and select Get Info.
- Under the General section, make sure the checkbox of “Locked” is not ticked.
- After that, go to select the file and delete it again.
4. Change the Permission of the File
- You may not have permission to edit or delete the file. You can right-click the file and select Get Info.
- Under the Sharing & Permissions section, you can change the permission of the file to Read & Write.
5. Empty the Trash First and Delete the File Again
If the Trash is full and lacks space, you may not be able to delete files on your Mac. You can empty the Trash first and then try to delete the file/folder again.
- Click the trash bin icon in the Dock to open Trash on Mac.
- Click the Empty button at the upper-right corner and click Empty Trash to delete all items in Trash.
- Then you can try to delete the file or folder again to see if it can be deleted on your Mac.
6. Force Delete the File in Safe Mode
You can start your Mac in Safe Mode and try to delete the file/folder in Safe Mode.
7. Force Delete Files/Folders on Mac with BuhoCleaner
BuhoCleaner is a top Mac cleaner program that lets you clean and speed up your Mac. You can use it to find and delete large files/folders on your Mac to free up space. It also contains a professional Disk Space Analyzer to analyze the space usage on your Mac. You may try to delete the file that won’t be deleted on your Mac with BuhoCleaner.
- Launch BuhoCleaner after downloading and installing it.
- Click Toolkit > Disk Space Analyzer.
- Select a location you want to scan. Here you can select the location that contains the file you want to delete. Click Scan to let it scan and analyze the disk space usage.
- Find the target file that you want to delete. Click Remove to delete it.
Other Tips to Fix Can’t Delete File on Mac
- The file you are trying to delete might be open. You can close the file first and try to delete it again.
- The file may be in use by another application or process. You can close all open applications and try to delete the file again.
- Try to restart your Mac and then delete the file/folder again.
- The file may be corrupted or damaged. In this case, try to force delete the file with Terminal on Mac. The guide is introduced above.
Conclusion
This post mainly introduces how to force delete a file on Mac. If you can’t delete a file or folder on your Mac, you may try the solutions and tips in this post to successfully remove the file. For more Mac and iPhone tips, you may visit our official website: https://www.drbuho.com/.
FAQs
Why Can't I Delete a File on Mac?
There could be several reasons why you can't delete a file on a Mac. Below are the main ones:
- You don't have the permission to delete it.
- The file is in use.
- The file is locked.
- The file belongs to the system.
- The file is corrupted.
How to Force Delete a Directory on Mac?
Open Terminal and type
rm -rf
followed by your directory name in the Terminal and press Enter.Example:
rm -rf MyFolder
Cassie has been writing about technology for her entire career life - over 5 years. She enjoys diving into how Apple products work and then breaking it down in a way anyone can understand.