0

My MacBook is running Yosemite 10.10.2.

I want to delete a single file permanently using command-shift-delete but it asks "Are you sure you want to permanently erase the items in the Trash?" which is something I don't desire.

I only want to delete this one single file from my Macbook. How can I achieve this?

  • I'd really like to know why you are using Trash as a temporary storage/recovery facility - if you think you might need a file again later, don't throw it away. That way you always know you can empty the Trash. For a recovery facility, use Time Machine, that's what it's for. – Tetsujin Aug 7 '16 at 7:08
2

From what you said in your question, I'm assuming the file you want to delete is already in the Trash.

  • In Terminal (/Applications/Utilities/) type the rm command followed by a space.

  • Click the Trash Dock Tile to open a Finder window to the Trash. (Note that if the target file is not in the Trash just bring up the target file in Finder.)

  • Drag and drop the target file from the Trash (or whatever Finder window it's in) onto the Terminal window. This will add the fully qualified pathname of the file to be deleted to the rm command.

  • Example: rm /Users/me/.Trash/googlechrome.dmg

  • Press enter and the file should now deleted.

For additional options to the rm command have a look at: OS X Man Pages for rm

If the target is a folder use rm -dr ... where ... is the pathname of the folder to be deleted.

0

The answer of rm is best; however if Terminal and the command line make you squeamish, you could create a temporary folder on your desktop, move all the Trash contents except for the file you want to delete, empty the trash, then move the files back to the Trash from the temporary folder.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .