Deleting a file or folder from a Mac is as easy as hitting the Command + Delete keys, but on rare occasions stubborn files may refuse to be deleted. The oddest warning message displayed in such cases is: “The item ‘filename.xxx’ can’t be moved to the Trash because it can’t be deleted.”
As you can see, this warning message isn’t much help here, so it could probably simply be a bug related to Finder. Fortunately, solving this issue is pretty easy: just quit and relaunch Finder and you should be able to finally move that stubborn file to the trash.
To achieve this you’ll need to Force Quit the Finder app either by pressing the Command + Shift + Escape keys or Option + Right click on the Finder icon in the Dock.
The reason for getting this error may vary, but the most likely cases are as follows:
4. The file is damaged or corrupted, and the system is having a hard time finding it on the disk drive.
The first thing to do in this situation is to quit all applications that might be using that specific file, even those that you might not think are using it. To do this, simply press the Command + Q keys after activating the application, or open Activity Monitor and kill all the processes you think might be using the file.
If the file is locked, the user doesn’t have permission to remove the file or it is damaged, then it is best to first check the file permissions. Select the file and press the Command + I keys or right-click the file and select “Get Info”.
To modify permissions in macOS High Sierra, click on the lock icon located in the bottom right of the Get Info window, at which point you’ll need to enter the admin password to initiate the change to the file permissions. In this section you’ll see who can read and write the file, and if your user doesn’t have this privilege then select that option.
To manually unlock files via Terminal, type the following command:
chflags nouchg [name of file]
After the permissions change, you’ll be able to delete the file either by dragging it to the trash or via the Terminal command “sudo rm –R” followed by the location of the file.
On rare occasions you might need to force the trash to be emptied. One method is to quit all active apps and then securely empty the trash by holding down the Command key and right-clicking on the trash icon. Mac users with SSDs won’t see the “Secure Delete” option, however.
Advanced users might prefer emptying the trash via a Terminal command. Don’t use the very powerful “sudo rm -rf” command, because it will erase everything without warning. Use it only if you know what you are doing. Instead, we recommend using the following, safer method of removing files using Terminal:
As always, use Terminal commands with care and only when you are absolutely sure of what you are doing, otherwise the risk of deleting something significant is pretty high.
Best Reviews may receive compensation for its content through paid collaborations and/or affiliate links. Learn more about how we sustain our work and review products.
©2012-2024 Best Reviews, a clovio brand –
All rights
reserved
Privacy
policy
·
Cookie
policy
·
Terms
of use
·
Partnerships
· Contact
us
An easy fix for deleting a file on mac that I could not put in the Trash or delete… simply “relaunched” the Finder and the file was gone.