I’ve got an internal SSD on a 2018 MBP, with these drives macOS no longer gives you the option to secure erase the trash.
I’ve connected an older HDD external drive which I wish to secure erase the trash on, how can i do this in OSX 10.13 ?
I’ve got an internal SSD on a 2018 MBP, with these drives macOS no longer gives you the option to secure erase the trash.
I’ve connected an older HDD external drive which I wish to secure erase the trash on, how can i do this in OSX 10.13 ?
To securely “empty” the trash on an external drive you can use the rm command with the -P option which will overwrite it 3 times - similar to a DoD 3-pass overwrite.
% rm -P /Volumes/foo/bar/.Trash/*
The other option is to reinstall srm via Homebrew or Macports and use srm in place of rm
% srm /Volumes/foo/bar/.Trash/*
You could even create an alias and put it in your .zprofile or .bash_profile depending on the shell you’re using.
alias emptytrash=‘rm -P /Volumes/foo/bar/.Trash/*’
Secure erase relies on writes replacing the data in the blocks allocated for a file. With SSDs this is technically not possible. If you want to protect data on an external drive, you need to encrypt it (can be done with a right-click on the drive in Finder).
PS: encrypting external drives is advisable in general, otherwise anybody with physical access to the drive can access its content.
-P This flag has no effect. It is kept only for backwards compatibility with 4.4BSD-Lite2.
Therefore using -P is no more secure than not using it.
– Krolaw Feb 19 '24 at 18:23