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

Yet another undeletable files solution System
If you are having troubles deleting files from Trash, use XRay, a shareware app. It allows you to change authorization without using arcane commands in Terminal.

I was so frustrated by the undeleted file as it was interfering with other files in Trash so they could not be deleted either. XRAy is a wonderful product and well worth the $10 shareware fee.

[Editor's note: XRay has been mentioned here before, but not in the specific context of dealing with undeletable files. I actually worked with the author on other means of deleting the troublesome file, and nothing we tried was successful -- not that I know all the tricks, but the ones I did know didn't do anything to help the author.]
    •    
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[7,096 views]  

Yet another undeletable files solution | 5 comments | Create New Account
Click here to return to the 'Yet another undeletable files solution' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Aliasing
Authored by: Mikey-San on May 28, '02 09:30:06AM

Just as a bit of do-it-yourself-itude, here's a snippet of my .tcshrc file:

alias emptytrash 'rm -rf ~/.Trash/*'

It's quite useful when something in my Trash doesn't want to be emptied, for whatever reason.

My two sticky bits. :-)



[ Reply to This | # ]
Re: Yet another undeletable files solution
Authored by: dev909 on May 28, '02 10:53:15AM
or you can use my script!

set empty_local to
"chflags -R nouchg /.Trashes/* ~/.Trashes/* ~/.Trash/* ; rm -rf /.Trashes/* ~/.Trashes/* ~/.Trash/*"
set empty_all to
"chflags -R nouchg /.Trashes/* ~/.Trashes/* ~/.Trash/* Volumes/*/.Trashes/* ; rm -rf /.Trashes/* ~/.Trashes/* ~/.Trash/* Volumes/*/.Trashes/*"

display dialog "Empty Trash as root?" buttons {"Cancel", "User & Local", "All Volumes"}
default button "CANCEL"
set the user_choice to the button returned of the result
if the user_choice is "User & Local" then
do shell script
empty_local with administrator privileges
end if
if the user_choice is "All Volumes" then
do shell script
empty_all with administrator privileges
end if
tell application "Finder" to empty

-- emptytrashX 0.6
-- © 2002 devils@pobox.com


[ Reply to This | # ]
undeletable files solution
Authored by: ej@salk.edu on May 29, '02 04:04:41AM

I had a case of undeletable files in a directory (not in the trash); I wanted to get rid of the entire directory. No permissions changes would fix the problem, could not delete from the command line either. Turns out the immutable bit had been set (no idea how this happened). The solution was to do this in the terminal:

chflags -R nouchg mydirectory

(this turns off the immutable bits on the entire directory and its contents)

After this,

rm -fr mydirectory

deleted the entire directory.



[ Reply to This | # ]
Don't forget locks...
Authored by: robzed on May 29, '02 06:07:23PM

So I get this undeletable file.

Finder is telling me something about not having sufficent privileges.

I sigh.

- Go into terminal and do this old sudo rm filename. Nope, that doesn't work.
- Log in as root, and try to delete it. Still doesn't work.
- Go into terminal. Change the file permissions to allow anyone to delete it. Still won't go.
- Try a few other things. Won't let me move it or anything.
- So, I'm sitting there stumped, when I notice something about the corner of the icon. I have my icons smallish. Hmmm. Suddenly it dawns on me. Go into Get File info, and sure enough ... the file is locked. Uncheck the box, and all is fine.

Just goes to prove, no matter how smart you think you are, even the simplest things can catch you up.



[ Reply to This | # ]
Removing files from trash
Authored by: Graham Haultain on May 29, '02 08:19:58PM

I had the folder from hell in trash and nothing I did in OSX had any effect and then the penny dropped. I moved it into Documents restarted in OS9 (not Classic) and went into Users/ Documents and trashed it.QED



[ Reply to This | # ]