Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Use Secure Empty Trash to avoid 'in-use' issues System
I've had a couple of occasions where a file would not delete from the trash because it was apparently in use by some unknown process, even though it should not be. I tried using lsof (see this hint), but wasn't having much luck. Then I tried using the Secure Empty Trash command in the Finder, and voila! that bugger was gone.

I dont know if this will work in all situations, but it worked for me, and hopefully for some others as well.
    •    
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)
 
[7,988 views]  

Use Secure Empty Trash to avoid 'in-use' issues | 11 comments | Create New Account
Click here to return to the 'Use Secure Empty Trash to avoid 'in-use' issues' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use Secure Empty Trash to avoid 'in-use' issues
Authored by: schneb on Feb 05, '04 11:44:45AM

Nope, did not work for me. Have two files I cannot get rid of. Tried the UNIX thing, your thing, BatChmod... oy.



[ Reply to This | # ]
Use Secure Empty Trash to avoid 'in-use' issues
Authored by: DHReutter on Feb 05, '04 11:59:42AM

Didn't work for me also... There is one file in one folder with an unreadable name... but ls didn't show it.
lsmac did say the following:

FSPathMakeRef(): Error -43 returned when getting file reference from /Users/reutter/.Trash/incoming/Goíµ?í·¥markí¶?í´.mp3

I really don't know what to do...



[ Reply to This | # ]
Use Secure Empty Trash to avoid 'in-use' issues
Authored by: wallybear on Feb 05, '04 12:43:13PM
Did you tried simply:

sudo rm -rd /Users/reutter/.Trash/incoming

(you will lose also the "incoming" directory)
or

sudo rm -rd /Users/reutter/.Trash/incoming/*

It should suffice.

[ Reply to This | # ]
Use Secure Empty Trash to avoid 'in-use' issues
Authored by: macubergeek on Feb 05, '04 06:59:12PM

sudo rm -rf /Users/reutter/.Trash/incoming
will work better
-r for recursive
-f for force



[ Reply to This | # ]
Deleting undeletable files
Authored by: beelers on Feb 05, '04 07:24:20PM
sudo rm ~/username/.Trash/undeletablefilename
That should remove anything that is in your way. Use with caution! Be sure you want to delete that "undeletable" file.

---
--
no sig is here

[ Reply to This | # ]

Deleting undeletable files
Authored by: fltman on Feb 06, '04 03:50:21AM
I have an issue with my trashcan. Check this out:

sudo rm -Rf /Users/andersbj/.Trash/kasta/
rm: /Users/andersbj/.Trash/kasta//OkaÌnt album: Directory not empty
rm: /Users/andersbj/.Trash/kasta/: Directory not empty
Any suggestions? Anyone?

[ Reply to This | # ]
Deleting undeletable files
Authored by: wallybear on Feb 06, '04 04:18:41AM

you are missing the -d switch (d stands for Directories)

use rm -rdf



[ Reply to This | # ]
Deleting undeletable files
Authored by: paalb on Feb 06, '04 11:17:32AM

Try:
sudo rm -rf /Users/andersbj/.Trash/*



[ Reply to This | # ]
Deleting undeletable files
Authored by: MacMuppet on Feb 06, '04 08:45:21AM

I use Cockatil for this, never failed yet.....



[ Reply to This | # ]
worked for me
Authored by: tobyvoss on Oct 03, '05 09:10:45AM

this hint worked for me, even on a loaded system extension.



[ Reply to This | # ]
Use Secure Empty Trash to avoid 'in-use' issues
Authored by: yerdle on Jun 01, '06 09:36:57AM

I just stumbled upon the trick today, too. Had Palm Desktop user files (no application) and, believe it or not, Holiday Lights bulb files that would not delete. Tried Secure Delete and they went bye-bye.



[ Reply to This | # ]