Tips for Deleting Stubborn Files

At some point, everyone encounters a file that just won't delete. The most common situation is a file that sits in the trash and refuses to be deleted, however many times you restart your mac. Here are 4 different methods for removing stubborn files, at least one of which is guaranteed to work.

Method 1 - Secure Empty Trash
Probably the most simple solution, and almost always works. Go to the Finder Menu in the top left corner of the screen and choose "Secure Empty Trash" located right below the usual Empty Trash. Secure Empty Trash is normally used to make sure deleted items stay deleted by writing over them multiple times with random data. Luckily this option seems to be more effective with stubborn files than the regular Empty Trash.

Method 2 - Third Party Applications
There are many applications available that allow you to force the trash to empty. One that is completely dedicated to it is Super Empty Trash, a free application with the sole purpose of helping you empty your trash. There are a few alternatives that perform many other tasks as well, such as OnyX (free).


Method 3 - Using the Terminal
This method requires a bit of care, as making a mistake in the Terminal can result in things going horribly wrong. To delete a file using this method, first open up the Terminal, located in the Applications/Utilities folder. Type in "rm -f " without the quotation marks, and with the space after the f. Then find the file that wont delete, and drag it to the Terminal window, and the path to that item should appear. Double check that this is the thing you want to delete, then press enter. If the item that won't delete is a folder rather than a file, type "rm -rf " instead.

If this still doesn't work, the next stage is to use "sudo rm -f " instead. This is a little more dangerous as you can accidentally delete lots more vital files. Carry out the steps as above, and this time you will be prompted to enter an administrator password.

Method 4 - Creating a temporary user account
This method is a little time consuming, but it is great if you don't want to use the Terminal. Start by going to the Accounts preference pane in the System Preferences and creating a new user account. It doesn't matter what details you give it, just remember the password. Next, move the troublesome file from your trash to the Shared folder, located in the Users folder. Log out of your account and log into the newly created one. From here, move the file into this users trash. Then log back out, and go back to your normal user account. Return to the Accounts pane in the System Preferences and delete the temporary account by selecting it from the list and hitting the delete key. Select Delete Immediately from the dialog box that appears, and the user account will gone, along with the stubborn file.
blog comments powered by Disqus