Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Proto Media

macrumors member
Original poster
Apr 25, 2006
48
0
Gnar Cal
Ok so I had a backup drive which is just a mirror of my normal drive. I am now selling my computer and want to delete all the files off the HD and do a fresh install of Tiger before I sell it. When I go to empty the trash, it says something like there is 17,000 items in it, and about a minute in it says "cannot delete said item because said item is in use"

This is AFTER I reinstalled Tiger. I chose the erase destination disk first, then install, thinking it would trash all these locked files, but after rebooting, my trash is still full of the same files that were on there before I did the re Install.

Does anyone know how to just like, blast the trash or something, some force trash command or something, maybe something with terminal? These files are taking up like 20 GB of room and I would really like to get them off of there before I go and sell the computer.

It is a dual 2Ghz PMG5. I know I can go into eash individual file and unlock it, I think thats whats causeing the problem cause I think they are like application files or something and the computer thinks that it needs them so it wont let them be deleted, but I would prefer not to have to unlock 17,000 files.

Any help is greatly appreciated. Thanks in advance!

- Ryan
 
I'm not sure I follow everything you said, but try using "Secure Empty Trash" from the Finder menu.
 
i'm not sure i understand either, because doing a fresh install should erase everything. if nothing else, try reinstalling the OS again and select the option that clears the hard disk (if you haven't done this already). perhaps also try reformatting the hard disk (which will erase everything on the disk) using the installation CD and then going through with installing the OS.
 
If you put all the items in the trash into a folder on the desktop, you can then highlight the folder, click Cmd+I, uncheck the locked file box and click on "apply to all enclosed items". Then try trashing them again. That might work. I think.


Alternatively, I might be talking complete bollox. :eek:
 
Use the file tab after being in that program thats locked, use get info to get access from there you can unlock it. Then trash it . At least thats how I remember it. or try skunks way.
 
PkennethV you are the Sh** Thank you so much for that link, I downloaded the software, and now those 17,000 files are gone! Thanks again so much you have no idea how much you have helped someone out. And thank you to all of the other people that replied.

GOOD DAY!
 
PkennethV you are the Sh** Thank you so much for that link, I downloaded the software, and now those 17,000 files are gone! Thanks again so much you have no idea how much you have helped someone out. And thank you to all of the other people that replied.

GOOD DAY!

I realize that your problem has been solved but here is another way to skin that "delete locked file" cat.

Hold down the option key as you empty the trash from either the Finder menu or while pressing shift/alt/delete keys.

Holding the option key will delete any locked files that are in the trash.

Pax
 
This happened to me before. I ended up going to the terminal and:
sudo rm -rfv /Path/To/File/FileName

of course, trash is in ~/.Trash. In that case you'd want to:

rm -rfv ~/.Trash/*

:)
 
I realize that your problem has been solved but here is another way to skin that "delete locked file" cat.

Hold down the option key as you empty the trash from either the Finder menu or while pressing shift/alt/delete keys.

Holding the option key will delete any locked files that are in the trash.

Pax

AWESOME. Been using Terminal and a bunch of commands I don't understand, like "sudo rm -r /~ ...." and NOTHING. The files won't delete. Held option and BOOYAH. BOOOOOYAH!
 
How do I delete locked files?

I've noticed that this thread is kind of old, but it is still there on google search results. After hours of trying many different things to try to delete thousands of LOCKED files from my computer, I came across a way to do this without having to download or buy anything, Mac computers are the best. Here is a step-by-step different solution for this problem.

1. Open Applications....... Utilities ....... Terminal
2. Copy and paste ( chflags -R nouchg ) inside terminal screen. do not press return yet
3. Open trash bin
4. Press command-A to select all files at once
5. Drag them all inside the Terminal screen
6. Press return
7. You are done! close everything. open trash and delete all your files.

It is so easy. I am sure someone out there will know a better way.... I wish they had posted before. I spent 4 hours trying to get rid of those damn files. I hope you find this thread for this will put a smile in your face.:)
 
thread shows oldest up tp

Perhaps, someone can teach me how to set up newest thread replies up top...:eek:
 
It is so easy. I am sure someone out there will know a better way.... I wish they had posted before. I spent 4 hours trying to get rid of those damn files. I hope you find this thread for this will put a smile in your face.:)

Did you not try holding down the option key while emptying the trash? It seems the easiest solution and works every time for me.
 
Did you not try holding down the option key while emptying the trash? It seems the easiest solution and works every time for me.

I have a 1 year old MacBook Pro and it does work at all. Is there a box I should check somewhere in the system preference folder?
 
I've noticed that this thread is kind of old, but it is still there on google search results. After hours of trying many different things to try to delete thousands of LOCKED files from my computer, I came across a way to do this without having to download or buy anything, Mac computers are the best. Here is a step-by-step different solution for this problem.

1. Open Applications....... Utilities ....... Terminal
2. Copy and paste ( chflags -R nouchg ) inside terminal screen. do not press return yet
3. Open trash bin
4. Press command-A to select all files at once
5. Drag them all inside the Terminal screen
6. Press return
7. You are done! close everything. open trash and delete all your files.

It is so easy. I am sure someone out there will know a better way.... I wish they had posted before. I spent 4 hours trying to get rid of those damn files. I hope you find this thread for this will put a smile in your face.:)

Thanks a bunch Cinema.
Your method works great.

I had a couple of locked files on my USB shared drive (through the airport) that prevented me from deleting everything on the drive.
 
Solution to deleting locked files on Mac

If your files will not go to the trash
1. Select the folder they are in,
2. Select File: Get Info:
3. Click the lock at the bottom to unlock.
4. To the left of that, there is a gear with a menu arrow to the right of it. Click on the arrow, then click: Apply to enclosed items.

This should unlock the items you want to delete.
 
Try this...

Go to Finder, choose "Secure Empty Trash" and begin holding the option key until the trash is completely emptied.
 
I realize that your problem has been solved but here is another way to skin that "delete locked file" cat.

Hold down the option key as you empty the trash from either the Finder menu or while pressing shift/alt/delete keys.

Holding the option key will delete any locked files that are in the trash.

Pax

its 2012 and this still works :)
 
Just use this to clear the lock, works every time. In case you want the lock gone but the file to remain.

chflags -R nouchg /path/to/the/offendingfile
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.