Secure empty trash on external drive OSX

Solution 1:

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/*’