Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

There are some locked files in my trash that I removed from an external hard drive. I have tried a few different things but I delete them.

I have tried:

sudo rm -rf ~/.Trash
mkdir ~/.Trash
killall Finder

and a couple of different programs, but nothing gets rid of the files.

share|improve this question
1  
Have you tried logging out and back in, or restarting the machine? Also note that the files removed from an external drive are on the Trash folder on the drive itself. –  slhck Apr 30 '12 at 11:08
    
hi, i tried restarting etc but as soon as the drive booted they appear again. How would i empty the trash folder on a drive? –  Bobin Apr 30 '12 at 12:15

1 Answer 1

up vote 2 down vote accepted

If your files weren't stored on your Mac, they won't land in

/Users/username/.Trash

… but instead on the drive itself, which is accessible here:

/Volumes/volume-name/.Trashes/501/

The number 501 is the default user ID of your Mac OS X user account. You can try to manually rm the files from there.

For example:

cd '/Volumes/La Cie/.Trashes/501' ← this will go to the Trash on your external drive
ls ← this will list all files in the Trash
rm some-file ← this will remove the file named some-file from the Trash

If that fails, the problem is that the files aren't owned by your user account. Therefore you can try to prefix rm with sudo, which will try removing the file with root permissions.

share|improve this answer
    
i know this probably makes me a bit stupid but what is the code i would use to do this? Its an external hard drive calle La Cie.. –  Bobin Apr 30 '12 at 15:35
    
Sorry, I thought you were aware of the terminal commands. You can use cd '/Volumes/La Cie/.Trashes/501/' to get there and then try to list the files with ls. Remove a file by typing rm name-of-file. Report back if you have any issues! –  slhck Apr 30 '12 at 15:44
    
thank you, got in to the directory ok however each of the items is a folder that contains another folder and then another and then two locked files. They are about 27 in total. Is there a quicker way that doesn't involve going in to all of the folders? –  Bobin Apr 30 '12 at 15:54
    
just as an addition i tried going in to the folders and got this: –  Bobin Apr 30 '12 at 15:58
    
override rw-r--r-- root/wheel uchg for Bootx? - when i tried to delete –  Bobin Apr 30 '12 at 15:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.