Problems erasing files

Joined
Sep 9, 2010
Messages
20
Reaction score
0
Points
1
Hi every one,

I'm having problems eliminating files from my waste basket. Some files are "protected" and other cannot be read or written and it reports an error -36.
It try to erase these files directly from the waste basket but the process stops after a couple of seconds.
I have tried to use the terminal and I managed to erase single files, but when it comes to directories, the system says it's a directory and won't erase it.

Is there any other way to eliminate these files?

Thanks for your help.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
What Terminal command did you use? You likely didn't tell it to delete recursively. The command you want is as follows:
Code:
rm -rf ~/.Trash/*
The -r argument will remove files recursively (delete a file within a folder, within a folder...) and the -f argument will remove the files without prompting (handy if you have a lot of files to delete and you don't need to ensure that only certain ones get deleted).
 
OP
C
Joined
Sep 9, 2010
Messages
20
Reaction score
0
Points
1
What Terminal command did you use? You likely didn't tell it to delete recursively. The command you want is as follows:
Code:
rm -rf ~/.Trash/*
The -r argument will remove files recursively (delete a file within a folder, within a folder...) and the -f argument will remove the files without prompting (handy if you have a lot of files to delete and you don't need to ensure that only certain ones get deleted).

Hi, and thank you for your answer.

I tried what you told me but it did nothing at all. I use OS X 10.6.6 in Spanish (I live in Spain), could that have suppose a Trash directory name change that would affect the command line you told me?

Also, I tried to type "rm -rf" and drag these files and directories one by one, but some files have 0 KB weight and no modification date. Others simply do not disappear because of a "Permission denied" error. Error that I do not understand because I changed these directories and file's properties so that all users could modify/delete them.

Could it be possible to erase them with another method, maybe deleting the Trash directory and creating a new one?

Thanks
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
You can add sudo in front of that rm command:
Code:
sudo rm -rf ~/.Trash/*
That will give you root privileges which will allow you to delete any file. When sudo asks for your password, enter your own password.

As for the name of the Trash, I have no idea if it is named differently. You'll have to tell me that ;).
 
OP
C
Joined
Sep 9, 2010
Messages
20
Reaction score
0
Points
1
I solved the problem connecting the drives to my XP pc and deleting al Mac OS X files. Connected them back to my Mac and all is fine.

Thank you anyway for your help :D
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top