4

I have a program which, when deleting any app, also deletes the extra files and junk as well; including .plist files. Normally this works great though, this time around I've had a few files which won't allow me to empty the trash.

I get the following when I click on "Empty Trash":

The operation can’t be completed because the item “com.justinmind.prototyperfree.plist” is in use.

The operation can’t be completed because the item “com.marketcircle.Billings3.plist” is in use.

The operation can’t be completed because the item “com.opendns.osx.DNSCrypt-Menubar.plist” is in use.

The operation can’t be completed because the item “hewgill.com.Stack-Exchange-Notifier.plist” is in use.

I tried the following without success:

launchctl unload /System/Library/LaunchAgents/com.justinmind.prototyperfree.plist and launchctl unload /Users/myname/.Trash/com.justinmind.prototyperfree.plist

Not sure how to stop these things so I can empty the trash. Any help would be appreciated, thanks!

OS X 10.9 (13A603)

  • rm -rf ~/.Trash/* should do the work. – Matthieu Riegler Dec 11 '13 at 17:49
10

When you have problems to empty the trash, rm -rf ~/.Trash/* in the terminal does the job for you.

Edit :

You have to keep in mind that there might be multiple .Trash directories.
For example on a USB stick or a external Drive, OSX will create another .Trash at the root of the drive. So you might need to use rm -rf /Volumes/DriveName/.Trash.*

  • Great, thanks Matthieu! This is a more direct way of deleting vs the solution I found in my answer. – Natetronn Dec 11 '13 at 18:15
0

I'm not sure if I will continue running into this issue or not and or if this was the "correct" way of doing it though, the following worked to delete the files:

https://apple.stackexchange.com/a/24122/33469

0

I had this issue. It was an app that didn't exist/was corrupted and the description didn't help. For some reason, it seems that finder was using the file.

Preparation: open terminal and copy the following line (don't paste it yet): sudo rm -rf ~/.Trash/*

Step 1: relaunch finder

  • command+alt+esc
  • select finder and click "relaunch

Step 2 (immediately while this is happening): empty the trash

  • Paste the above code into terminal (it should be copied already): sudo rm -rf ~/.Trash/*`
  • you'll probably have to type in your password.

I did this except I used alfred to empty my trash and it worked.

0

If none of the other solutions work, you may have to turn off System Integrity Protection in Mac OS X. This was a solution found suggested on Apple Stack Exchange as a method for editing the Keyboard-en.plist files for the Press-and-Hold Character Picker in OS X. Their solution referenced MacWorld UK here. To do so:

  • Reboot your Mac into Recovery Mode (Restart, hold ⌘-R until the Apple logo appears)
  • When the OS X Utilities window appears, go to Utilities > Terminal
  • Type csrutil disable and hit Enter
  • Reboot your Mac
  • Empty your trash. The .plist files should disappear
  • Reboot into Recovery Mode and this time enter csrutil enable into Terminal and then reboot again to resume System Integrity Protection on your Mac.

You must log in to answer this question.

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