Yosemite - Secure Empty Trash Problems

T

Terry_C

Guest
When trying to secure empty trash it reports "some files are locked" when they are not. Selecting the "remove all locked files option" does nothing and the trash doesn't empty. I can empty the trash normally though.

If I take an unlocked file and mark it as locked, move it to trash and try secure empty I get the above result. If I then unlock the file and try again I still get the same result. So it seems as though secure empty is seeing a false file lock somehow but then won't remove it.

Anyone else get this or could try it for me?

Same on all accounts on the same machine (Intel MAC)

Thanks
 
OP
T

Terry_C

Guest
I've just bumped this as still having the same problems on Yosemite. Could anyone try this for me and see if you can secure empty trash if it contains a locked file (after selecting the "remove locked items" option?

Cheers
 
Joined
Apr 26, 2008
Messages
2,963
Reaction score
120
Points
63
Location
Belgium
Your Mac's Specs
iPad Pro 12.9 latest iOS
Are you trying to empty the trash with files that were deleted from a removable media ?
If that is the case, connect the removable media from which you deleted the files and try again.
When the trash is emptied, correctly eject the removable media.

Cheers ... McBie
 
Last edited:
OP
T

Terry_C

Guest
Thanks for the replies.

@McBie - no these files are/can be created on the HD in my account (or a new account which makes no difference.) If I create a simple text file spreadsheet, pdf etc, lock it, delete it and then try and secure empty trash it fails to empty. If I unlock it it still won't secure empty but will empty "normally."

@harryb2448 this is a 2008 Intel MAC. I did a reformat and clean install of Yosemite with no problems everything else appears fine.

Thanks again for taking the time to reply
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
558
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Open up Terminal (/Applications/Utilities) and enter the following, pressing enter after each. First:
Code:
cd ~/.Trash/
Second:
Code:
[B]<scary command removed>[/B]
It will ask for your password which won't appear on screen as you type (don't worry, your keypresses are being registered). That's it.

Note: that won't secure empty it but it will clean it out.
 
Last edited by a moderator:
OP
T

Terry_C

Guest
@ vansmith - thanks for your reply. The problem is not being able to empty trash, that works fine from the finder menu option, it's the secure empty that fails. I can empty it but not securely if it contains a file which is, or has been, locked.
 
Joined
Aug 19, 2014
Messages
792
Reaction score
4
Points
18
how much ram?? the reason i ask is.

if yosemite is using to much ram it creates a ram log file in trash and locks the file because the trash is constantly being used and written to this is why i recommend more then 4 gigs of ram with yosemite i even warned apple in beta testing this and they ushered me that is was fixed guess not
 
OP
T

Terry_C

Guest
@ johnodd4 Thanks, there are no log files in the trash that I can see, hidden or otherwise. I have 4Gb ram. I have to say though that since loading Yosemite this is the first time I can remember seeing the swap file being used, although the memory pressure is always green
 
Joined
Jan 9, 2018
Messages
9
Reaction score
0
Points
1
Wtf?!

Open up Terminal (/Applications/Utilities) and enter the following, pressing enter after each. First:
Code:
cd ~/.Trash/
Second:
Code:
sudo rm -rf *
It will ask for your password which won't appear on screen as you type (don't worry, your keypresses are being registered). That's it.

Note: that won't secure empty it but it will clean it out.

THANKS ***! I did this and it deleted EVERYTHING on my computer instantly. That's over 7 years of my career, GONE!!!!! F YOU!
 

IWT


Joined
Jan 23, 2009
Messages
8,583
Reaction score
976
Points
113
Location
Born Scotland. Worked all over UK. Live in Wales
Your Mac's Specs
iMac 5K Retina 27", August 2019, 3.6GHz Intel Core i9, Memory 32GB, 2TB SSD, macOS Monterey 12.4
@SirenWilliams

Thank you for your post.

This thread is from 2014, the last post to it being over 3 years ago.

I am deeply sorry that you have had such a terrible experience.

I have two comments to make of a general nature:

1. Terminal is for the advanced user and it is crucial that the input is absolutely exact - missed space, a / instead of a \ can cause grave problems - which is why I never dabble in it. I just don't have the necessary experience or confidence.

2. I don't understand how a computer could be wiped out; but surely anyone undertaking such as task - or indeed anyone who values their data - would have a comprehensive Backup strategy? Time Machine at the very least; plus a Clone (Carbon Copy Cloner or SuperDuper!)

If so, the Mac could be restored to its former position.

Ian
 
Last edited:
Joined
Jan 1, 2009
Messages
12,794
Reaction score
1,859
Points
113
Location
Winchester, VA
Your Mac's Specs
MBP 16" 2021 (M1Pro), iPhone 13 Pro, an iMac, plus ATVs, AWatch, MacMini
I suspect that SirenWilliams didn't execute the first command to cd to the .Trash folder on root. The system was probably at root when the command for rm was executed, wiping out the drive. rm is a powerful and unforgiving command and the way that line executes it basically forces everything in the directory in focus to be erased. If that directory was at root, the drive is wiped.

Lesson for those reading: When you use a powerful tool, make sure you know what you are doing and double check everything. I know you never make mistakes, but do it anyway.

EDIT: I just did a little experiment. On the command for cd, I put a space between the "/" and ".Trash" and executed it and I ended up at my home folder. Had I then executed the rm command, then everything in my home folder, plus all subfolders from there down, would have been erased.
 
Joined
Jan 9, 2018
Messages
9
Reaction score
0
Points
1
@SirenWilliams


1. Terminal is for the advanced user and it is crucial that the input is absolutely exact - missed space, a / instead of a \ can cause grave problems - which is why I never dabble in it. I just don't have the necessary experience or confidence.

2. I don't understand how a computer could be wiped out; but surely anyone undertaking such as task - or indeed anyone who values their data - would have a comprehensive Backup strategy? Time Machine at the very least; plus a Clone (Carbon Copy Cloner or SuperDuper!)

If so, the Mac could be restored to its former position.

Ian

I copied and pasted, so there was no error on the input. I had also done this in the past, but not sure of the exact code. I assumed this would be the same. It didn't prompt me for a password or anything and everything was gone several minutes later.
 

IWT


Joined
Jan 23, 2009
Messages
8,583
Reaction score
976
Points
113
Location
Born Scotland. Worked all over UK. Live in Wales
Your Mac's Specs
iMac 5K Retina 27", August 2019, 3.6GHz Intel Core i9, Memory 32GB, 2TB SSD, macOS Monterey 12.4
Desperately sad, SirenWilliams.

Do you have a backup of the kind mentioned in my first post?

That's the crucial question. If yes, we can talk you through getting back to normal.

If no, then I fear all is lost.

It is conceivable, that a data recovery service could get most of it back, but.....big $$$$

Ian
 
Joined
Jan 9, 2018
Messages
9
Reaction score
0
Points
1
Desperately sad, SirenWilliams.


It is conceivable, that a data recovery service could get most of it back, but.....big $$$$

Ian

I don't have back-up's of everything. The computer was running out of space and I was getting the notifications, and I was quickly trying to transfer files onto a hard drive but it was moving slowly, and things weren't deleting from the trash bin. All that was in there was a couple of videos I'd created.

I spoke to a computer repair shop that told me there was nothing they could do and advised that I contact Apple. I called the nearest Apple store and spoke to someone in repairs, and even a supervisor, and they informed me that once files are deleted, there isn't a way to retrieve them. In this world, I find that somewhat hard to believe.
 
Joined
Jan 1, 2009
Messages
12,794
Reaction score
1,859
Points
113
Location
Winchester, VA
Your Mac's Specs
MBP 16" 2021 (M1Pro), iPhone 13 Pro, an iMac, plus ATVs, AWatch, MacMini
Well, if you remove the drive from the Mac, put it in a separate enclosure, install a new drive in the Mac and install an OS and then look for something like Data Rescue, you might be able to recover. But if you have reinstalled or changed anything on the drive, that becomes more problematic. Every action on the drive has the potential to overwrite something that might be recoverable. Here is the developer site for Data rescue:

https://www.prosofteng.com/data-recovery-software/
 
Joined
Jan 9, 2018
Messages
9
Reaction score
0
Points
1
Well, if you remove the drive from the Mac, put it in a separate enclosure, install a new drive in the Mac and install an OS and then look for something like Data Rescue, you might be able to recover. But if you have reinstalled or changed anything on the drive, that becomes more problematic. Every action on the drive has the potential to overwrite something that might be recoverable. Here is the developer site for Data rescue:

https://www.prosofteng.com/data-recovery-software/

I'm not sure who to get to take on that sort of task. Apple and the local computer repair place both told me they couldn't do anything. Any tips on finding someone who can? I haven't changed or installed anything, at least to my knowledge.
 
Joined
Jan 1, 2009
Messages
12,794
Reaction score
1,859
Points
113
Location
Winchester, VA
Your Mac's Specs
MBP 16" 2021 (M1Pro), iPhone 13 Pro, an iMac, plus ATVs, AWatch, MacMini
Well, what Mac do you have, exactly, and what version of the OS?
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
14,253
Reaction score
915
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio, macOS Monterrey, 32 GB
I've removed that command from the post since those who don't know what it does shouldn't be using it and the people that know what it does already know what the command is.

Either way, unless all of your files were sitting in the trash can, if you followed that post's commands exactly, you wouldn't only emptied your trash can. My guess is that the first command was executed or confirmed to have been executed and the second command will blow away the contents of whatever folder you happened to be in. By default, opening the Terminal puts you in your home directory.

If you don't have a backup of your data, you can go the manual recovery route or find recovery people to send the disk to and have them recover your data. The former is "cheap" while the latter can be quite expensive.
 
Joined
Jan 1, 2009
Messages
12,794
Reaction score
1,859
Points
113
Location
Winchester, VA
Your Mac's Specs
MBP 16" 2021 (M1Pro), iPhone 13 Pro, an iMac, plus ATVs, AWatch, MacMini
Well, I copied the cd line to my terminal and it worked perfectly, so if that was executed as it was in the original post, it should have taken SirenWilliams to his own .Trash folder. But as I said, if there is a stray space included, it ends up at the home directory, and blindly executing the second command will, in fact, wipe out the home directory with no further warning. But if he's not messed with that drive it may be recoverable using some of the data rescue type software. Won't be fun, but should be do-able.
 

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