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

Mac OS X Ocelot

macrumors 6502a
Original poster
Sep 7, 2005
603
0
I've been having a weird problem where I try to empty the Trash but a file will not want to be deleted because it's currently "in use." I'm well aware of this error, but in these cases these files definitely are not in use. They're either files that I haven't opened in forever, or never at all, or files I have recently opened but quit the app using them.

For instance, just now I can't delete a game because an .icn file (a skin file for a unit in the game) is "in use." I call shenanigans on my mac! I haven't even played that game in months, much less running it right now! And I've never opened that file with any other app.

Has anyone else had this problem? I've recently clean installed Leopard after months of using a simple upgrade. It solved some issues, but that one seems to have gotten worse. I have to log out completely to empty my Trash, since I don't know which process exactly to quit. Any help?
 
Hmm...that's strange. I have Tiger, and whenever I encounter an "in use" file in the trash, just one log out cleans it up.

Maybe 10.5.2 will fix it?
 
Put all the stuff in the trash in a folder on your desktop named "crap" and then go to Terminal and run:

Code:
sudo rm -r ~/Desktop/crap
 
If I have have some files in use in the trash, and it's not a normal app that uses them.. Well, I just restart Finder. That usually loosens them up..
 
Put all the stuff in the trash in a folder on your desktop named "crap" and then go to Terminal and run:

Code:
sudo rm -r ~/Desktop/crap

Or better, also use for force option (f):

Code:
sudo rm -rf ~/Desktop/crap

This might just be something that everyone knows, but that didn't work when I had a blank password set for my admin account. As soon as I set the password to something, even a single letter, this worked perfectly.

I'm probably stating the obvious, but I thought it worth noting as this thread showed up in a Google search for this problem of deleting locked files so might be read by newbies (like me :) ).

Thanks
 
If you're curious as to what program is actually accessing that particular file that you're trying to get out of the trash, you can also run the following in terminal:

Code:
lsof | grep <filename>

That will give you a listing of all open files in the OS at that time, and by piping it into grep <filename>, your output will be the file that you're trying to remove, and the program that is using it.

Then you can exit that program, or kill it if needed, and empty the trash then.
 
HI all,
I can't seem to get this to work!!!!

HELP!!!! I've got ENTIRELY too much stuff in my trash and every time I try to empty it, it says something is running, that is NOT running.

I tried this terminal option but I can't get it to do anything!!
 
HI all,
I can't seem to get this to work!!!!

HELP!!!! I've got ENTIRELY too much stuff in my trash and every time I try to empty it, it says something is running, that is NOT running.

I tried this terminal option but I can't get it to do anything!!

After emptying everything it will let you empty, you might try a re-boot, and then empty trash again.
 
[[ HELP!!!! I've got ENTIRELY too much stuff in my trash and every time I try to empty it, it says something is running, that is NOT running.
I tried this terminal option but I can't get it to do anything!! ]]

Try this:
1. Shut down the Mac. Power it all the way off.
2. Reboot the Mac.
3. When you get to the finder, try emptying the trash now.

Any better?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.