Undeletable nested folders in Trash - Terminal expert please??

Joined
Mar 20, 2006
Messages
176
Reaction score
10
Points
18
Location
England
Your Mac's Specs
3.8 GHz 8-Core Intel Core i7 AMD Radeon Pro 5500 XT 8 GB / 80 GB 2133 MHz DDR4
I have an internal SSD called Work and since using Data Rescue 3 on my MacPro (10.6.8) there are some nested folders in the Trash that will not delete. I have done all the Verify disk, Repair permissions and I can't move the files out to the desktop, they simply Copy. Secure delete doesn't work either. The final nested folder is named < /v%9Esv%[%F1%AD%FA<M]%E3R%F4t >. I'm presuming Terminal is the only way to get shot of it, so any help would be much appreciated. I have tried Force Delete applications too.
Thanks for any help.
Howard
 
Joined
Nov 28, 2007
Messages
25,564
Reaction score
486
Points
83
Location
Blue Mountains NSW Australia
Your Mac's Specs
Silver M1 iMac 512/16/8/8 macOS 11.6
Have you tried a reboot and/or Secure Empty trash? Can you tell us why you ran Data Rescue?
 
OP
Kryten
Joined
Mar 20, 2006
Messages
176
Reaction score
10
Points
18
Location
England
Your Mac's Specs
3.8 GHz 8-Core Intel Core i7 AMD Radeon Pro 5500 XT 8 GB / 80 GB 2133 MHz DDR4
Thanks Harry. I had lots of mp4 movies on an external SSD which my new TV tried to format when I wasn't paying attention. I used DR3 to recover most of the movies from this drive to the internal SSD called Work, the drive with the undeletables. Once I had those, I copied them to another drive and deleted them from Work. That was when these nested folders decided to sit in the Trash as undeletable. I get the system message "The operation can’t be completed because you don’t have permission to access some of the items." when I am the only user of the Mac and logged in as Admin. Any number of restarts and Secure Empty does not work either.
Thanks again.
 
Joined
Dec 11, 2010
Messages
1,808
Reaction score
40
Points
48
Location
Chicago
Your Mac's Specs
late 2012 mini w/SSD
sudo rm -rf .Trashes/*
sudo means superuser Do - that's the admin user. It asks for your admin password, but it hides it from view as you type.
(rm = remove, -rf = recursive (all the files inside folders) and force (don't ask me "are you sure" for each))
Make sure you get the spaces in the right places (3 of them).
 
Joined
Jan 20, 2012
Messages
5,117
Reaction score
479
Points
83
Location
North Carolina
Your Mac's Specs
Air M2 ('22) OS 14.5; M3 iMac ('23) OS 14.5; iPad Pro; iPhone 14
sudo rm -rf .Trashes/*
sudo means superuser Do - that's the admin user. It asks for your admin password, but it hides it from view as you type.
(rm = remove, -rf = recursive (all the files inside folders) and force (don't ask me "are you sure" for each))
Make sure you get the spaces in the right places (3 of them).

Just curious (and NOT a terminal expert - more an 'avoider' ;)) - but the command line after the 'rm -rf' should specify the home directory (unless the user is already there), and also just '.Trash', like ~/.Trash - correct me if I'm wrong - Dave :)
 
OP
Kryten
Joined
Mar 20, 2006
Messages
176
Reaction score
10
Points
18
Location
England
Your Mac's Specs
3.8 GHz 8-Core Intel Core i7 AMD Radeon Pro 5500 XT 8 GB / 80 GB 2133 MHz DDR4
Erm...... I think I'll wait for a response before I dare enter the Terminal...!
 
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
Just curious (and NOT a terminal expert - more an 'avoider' ;)) - but the command line after the 'rm -rf' should specify the home directory (unless the user is already there), and also just '.Trash', like ~/.Trash - correct me if I'm wrong - Dave :)
Absolutely correct! Easier to
cd ~/.Trash
and then
rm -rf *.*
That way you only delete what's in the Trash.
 
Joined
Oct 16, 2010
Messages
17,639
Reaction score
1,639
Points
113
Location
Brentwood Bay, BC, Canada
Your Mac's Specs
2011 27" iMac, 1TB(partitioned) SSD, 20GB, OS X 10.11.6 El Capitan
sudo rm -rf .Trashes/*
sudo means superuser Do - that's the admin user. It asks for your admin password, but it hides it from view as you type.
(rm = remove, -rf = recursive (all the files inside folders) and force (don't ask me "are you sure" for each))
Make sure you get the spaces in the right places (3 of them).


Hmmm…??? Almost the same Terminal command that a recent poster posted he was told to use:
" rm -rf ~/.Trash/* "

Followed by an appeal for help for how to recover all their user desktop stuff that had gone poof!!! :D
 
OP
Kryten
Joined
Mar 20, 2006
Messages
176
Reaction score
10
Points
18
Location
England
Your Mac's Specs
3.8 GHz 8-Core Intel Core i7 AMD Radeon Pro 5500 XT 8 GB / 80 GB 2133 MHz DDR4
Sorry - completely lost now.
K.
 
Joined
Nov 28, 2007
Messages
25,564
Reaction score
486
Points
83
Location
Blue Mountains NSW Australia
Your Mac's Specs
Silver M1 iMac 512/16/8/8 macOS 11.6
Actually nowhere near the same the space is vital and I quote:-

"Then, type sudo rm -R followed by a space (don’t leave out the space character—it’s essential)."
 
OP
Kryten
Joined
Mar 20, 2006
Messages
176
Reaction score
10
Points
18
Location
England
Your Mac's Specs
3.8 GHz 8-Core Intel Core i7 AMD Radeon Pro 5500 XT 8 GB / 80 GB 2133 MHz DDR4
Sorry to be so pedestrian, but can you give me the complete Terminal text entry inc Returns once you're all agreed? I'm just not familiar with it and I can't afford to screw it. This Work drive is all my current work for all my clients. I do have Time Machine and SuperDuper backups but Restoring will only bring me back to square one.
Appreciate your input sincerely.
K.
 
Joined
Jan 20, 2012
Messages
5,117
Reaction score
479
Points
83
Location
North Carolina
Your Mac's Specs
Air M2 ('22) OS 14.5; M3 iMac ('23) OS 14.5; iPad Pro; iPhone 14
Hmmm…??? Almost the same Terminal command that a recent poster posted he was told to use:
" rm -rf ~/.Trash/* "

Followed by an appeal for help for how to recover all their user desktop stuff that had gone poof!!! :D

Yes - the opening post quote below from HERE - I did not respond, but would have changed to the directory first (as suggested by Craig) and then used the 'rm' command so its actions would have affected only the Trash folder.

SO, maybe Craig or other 'terminal gurus' can chime in to explain why the order of this command line deleted more than the OP wanted? I suspect the 'rm -rf' ended up seeing more than the Trash. Dave :)


After running the command " rm -rf ~/.Trash/* " thru the terminal, all the desktop files, documents and the emails are missing from the Mac OsX. Please guide on recovering/retrieving the files.
 
Joined
Oct 16, 2010
Messages
17,639
Reaction score
1,639
Points
113
Location
Brentwood Bay, BC, Canada
Your Mac's Specs
2011 27" iMac, 1TB(partitioned) SSD, 20GB, OS X 10.11.6 El Capitan
Sorry to be so pedestrian, but can you give me the complete Terminal text entry inc Returns once you're all agreed? I'm just not familiar with it and I can't afford to screw it. This Work drive is all my current work for all my clients. I do have Time Machine and SuperDuper backups but Restoring will only bring me back to square one.
Appreciate your input sincerely.
K.

If you don't like the Terminal method and the uncertainty, why not try using a utility like Trash It!???

Free and good reviews…
https://www.macupdate.com/app/mac/8214/trash-it
 
Joined
Dec 11, 2010
Messages
1,808
Reaction score
40
Points
48
Location
Chicago
Your Mac's Specs
late 2012 mini w/SSD
rm -rf' should specify the home directory (unless the user is already there), and also just '.Trash', like ~/.Trash - correct me if I'm wrong - Dave :)

Thanks for checking up on me Dave. I can't Believe I mistyped it as .Trashes instead of .Trash.

As the for the full pathway - I made a (somewhat) dangerous assumption - that the OP would be going to the Terminal, running the command, and leaving the Terminal. (So, he would be in the correct home directory.)

Thanks for everyone else that chimed in to straighten it out!
 
Joined
Dec 11, 2010
Messages
1,808
Reaction score
40
Points
48
Location
Chicago
Your Mac's Specs
late 2012 mini w/SSD
SO, maybe Craig or other 'terminal gurus' can chime in to explain why the order of this command line deleted more than the OP wanted? I suspect the 'rm -rf' ended up seeing more than the Trash. Dave :)

Sorry, but I suspect user error (it is easy to mistype) :D
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
Sorry, but I suspect user error (it is easy to mistype) :D

Yea, if you put a space in between ~/ and .Trashes you would have EXPLICITLY told the OS to recursively delete ~/ (your home directory) and .Trashes (which would normally be ~/.Trashes). So.. I (highly) suspect that this is what happened.
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
btw, in this case.. I'd have removed the directory by inode, it's much safer.
 
OP
Kryten
Joined
Mar 20, 2006
Messages
176
Reaction score
10
Points
18
Location
England
Your Mac's Specs
3.8 GHz 8-Core Intel Core i7 AMD Radeon Pro 5500 XT 8 GB / 80 GB 2133 MHz DDR4

bobtomay

,
Retired Staff
Joined
Dec 22, 2006
Messages
26,561
Reaction score
677
Points
113
Location
Texas, where else?
Your Mac's Specs
15" MBP '06 2.33 C2D 4GB 10.7; 13" MBA '14 1.8 i7 8GB 10.11; 21" iMac '13 2.9 i5 8GB 10.11; 6S
see Cradom's post # 8 above
 

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