I had a script for securely emptying my trash bin from time to time and I was using srm. I suppose people would still have uses for srm. However, it appears that srm no longer ships with mac os. Are you aware of a candidate alternative to srm? Any word by anyone at all?

P.S. For example, here is random example where srm is used for securely emptying the trash bin. Notice that the example is for El Capitan, so srm disappeared in mac os Sierra (or at least, this appears to be the case).

  • 1
    The reason it was removed is that it's not secure. Why not use erase free space instead, or use FileVault?
    – Tetsujin
    Sep 22, 2016 at 7:35
  • 2
    The Mac Security Blog you mentioned says, "When OS X saves a copy of a file, it doesn't write that file to the same part of the disk. In layman's terms, what this means is that while you may be able to securely delete a file or folder, you cannot be certain that other copies of that file are not recoverable. As such, securely emptying the Trash is not reliable. While many Mac users miss this option, Apple felt it's better to be safe and not offer it if the feature isn't 100% reliable." See CVE-2015-5901.
    – creidhne
    Sep 22, 2016 at 7:53

3 Answers 3


You can use rm -P

     -P          Overwrite regular files before deleting them.  Files are overwritten three times, first with the byte pattern 0xff, then 0x00, and then 0xff again, before they are deleted.
  1. Install MacPorts and ...
  2. Find ports: srm
  3. Terminal: sudo port install srm

Apple removed srm because they felt it didn't work well enough and because using it on a SSD decreases the overall life of the drive. If you really want to use it you can download the source, unzip it, and then compile it yourself.

$ ./configure
$ make
$ make install
  • Have you got any sources backing up these claims why Apple removed srm?
    – idmean
    Feb 16, 2017 at 12:43
  • @idmean "With an SSD drive, Secure Erase and Erasing Free Space are not available in Disk Utility. These options are not needed for an SSD drive because a standard erase makes it difficult to recover data from an SSD." support.apple.com/en-us/HT201949
    – Molomby
    May 14, 2017 at 5:08
  • 1
    This no longer works; the srm formulae has been removed. There's a 3rd party tap for it here; install with brew install khell/homebrew-srm/srm then srm secrets.txt, etc. Better to not though.. see this related question.
    – Molomby
    May 14, 2017 at 5:14
  • Removed the section on installing from Homebrew. Feb 1, 2018 at 16:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.