Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Trash Wont delete locked items.

I have an application in the trash that is locked and I am unable to delete it. Ive tried using single user mode and terminal to erase it using the command rm -rf ~/.Trash/* but that has not worked. The app has all the package contents removed and is 0KB but I am unable to remove it.

Thanks


I have a MacBook Pro with Retina 13" on OS X 10.10.3 (It also wouldn't erase on other previous software version)

MacBook Pro (Retina, 13-inch, Mid 2014), OS X Yosemite (10.10.2)

Posted on Feb 9, 2015 2:01 PM

Reply
32 replies

Feb 14, 2015 11:53 AM in response to tbraun1551

Files in use, here's how to find what is using it...


http://hints.macworld.com/article.php?story=20040121001144687


Files in use, here's how to find what is using it...


Ever try to empty your trash, only to find that your request is refused because apparently some program is still using that file, so you get this nice message:

The operation cannot be completed because the item [whatever] is in use.

Sometimes this is a handy sanity check. Other times it's a downright nuisance, because you're just SURE that no program should legitimately be using that file. It happens to me frequently enough that I figure someone else could benefit from a little UNIX lore. The command-line UNIX program lsof rides to the rescue. This program lists all open files and file-like things. This is very handy, as nearly everything looks like a file in UNIX (and Mac OS X).


$ lsof | grep [whatever]


Where [whatever] is replaced with the filename you're looking for. With this, you can see which program is desperately holding onto your about-to-be-trashed file. Once you exit that program, your trash will empty.



http://hints.macworld.com/article.php?story=20040121001144687

Feb 18, 2015 9:49 AM in response to tbraun1551

Might try this from jsd2...


https://discussions.apple.com/thread/2787466


Open Terminal (in /Applications/Utilities) , and copy-paste the following line into the Terminal window, *followed by typing a single space. Do not type <Return> yet.*


sudo chflags nouchg



After typing the single space, drag the icon of the locked alias into the Terminal window, click inside the Terminal window, and type <Return>.


Enter your admin password at the prompt (it will not echo on the screen), and again type <Return>.


Now again Get Info on the file, and see if the Locked checkbox in the General section is now unchecked. If it is, you should now be able to either trash the file or change its permissions, as you wish.

Trash Wont delete locked items.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.