im using Macos Mojave, and some of my Xcode files were locked i guess by the system. So i trashed them and now im not able to clean the Trash. Im getting annoying error The operation can't be completed because the item is in use … Rebooting in safe mode, disabling login items, fixing permissions on disk does not helped. How can i clean my trash?

  • Fixing permissions is typically for several years old os. Might you edit this to show you performed these steps in order? support.apple.com/en-us/HT201583 – bmike Feb 21 at 12:49
  • yes i perormed these steps, support.apple.com/en-us/HT201583 i was not able to run first aid neither during normal boot, nor in cmd+R because in second case macintoshHD was greydout – swift2geek Feb 21 at 12:50
  • 1
    Which files exactly have you trashed? Are you talking Xcode system files? - or is it Xcode projects? (i.e. files that you have created yourself) – jksoegaard Feb 21 at 13:48
  • I had a similar issue once. Oddly enough I was able to empty my Trash after I disabled SIP. – NegativeChameleon Feb 21 at 13:59
  • ok, i was able to trash it with rm -rf ~/.Trash – swift2geek Feb 21 at 14:02

Posting the OP’s solution:

The trash can be emptied using:

rm -rf ~/.Trash
  • Does not work for me. Getting error message "Directory not empty" – zzheads Feb 22 at 6:38
  • This is NOT emptying your trash - this is deleting the user's trash folder! Additionally, this will not override a file in use error. The proper fix is to find out what process has the file open and close it. – Allan Feb 25 at 19:12

You must log in to answer this question.

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