Sudo command to empty tash for Mac Book Pro

Discussion in 'macOS' started by Slothzilla, Mar 8, 2015.

  1. Slothzilla macrumors newbie

    Joined:
    Mar 8, 2015
    #1
    I had almost 44,000 files to delete from my macbook and went to secure empty my trash. However the secure empty was taking forever and would stop every time I left my laptop for more than 10 minutes. I looked up a way to do it with sudo commands and finished the project in under a minute. My main concern now is did the sudo command secure delete the programs and free up space on my hard drive or did it just move them from view?

    The command line was:
    sudo rm -rf ~/.Trash/
     
  2. Ganesha macrumors regular

    Joined:
    Aug 4, 2009
    #2
    rm is the same as empty trash (non-secure version).

    to secure delete from the command line use srm. You can pass it options that will make faster than Finder's secure delete, such as -s which calls for a one pass overwrite, vs the 7 pass (i think) Finder will do.
     
  3. tomvos macrumors 6502

    tomvos

    Joined:
    Jul 7, 2005
    Location:
    In the Nexus.
    #3
  4. Slothzilla thread starter macrumors newbie

    Joined:
    Mar 8, 2015
    #4
    Is there a way to undo or redo what I did, like I already deleted the stuff from my recycle bin so is it to late. Is there a way to delete the files from like a sub directory or hidden folders on my computer?
     
  5. lowendlinux Contributor

    lowendlinux

    Joined:
    Sep 24, 2014
    Location:
    North Country (way upstate NY)
    #5
    rm -rf /path/to/file will delete the file. You really don't need the -rf though, -rf is recursive force and will only be needed if rm doesn't work.
     
  6. Slothzilla thread starter macrumors newbie

    Joined:
    Mar 8, 2015
    #6
    my computer is still running slow, how would you recommend speeding it up besides buying new ram.
     
  7. lowendlinux Contributor

    lowendlinux

    Joined:
    Sep 24, 2014
    Location:
    North Country (way upstate NY)
    #7
    Give it a Red Bull??
     
  8. Taz Mangus macrumors 68040

    Taz Mangus

    Joined:
    Mar 10, 2011
    #8
    Try this. Create a new partition on the hard drive and install Yosemite to the new partition. Boot to the new partition, don't install anything else. How does the system run, is it still slow? If it is not then you probably need to do a clean install on your hard drive.

    When you are done boot back to the other partiton and delete the partition you created.
     
  9. Bomb Bloke macrumors regular

    Bomb Bloke

    Joined:
    Feb 12, 2015
    Location:
    Tasmania (AU)
    #9
    If you wish to fully delete data which you've already emptied from your trash in a "non-secure" manner (such as by using the Terminal command you mentioned in your first post), use Disk Utility's "Erase Free Space" feature.
     
  10. Fishrrman macrumors G3

    Joined:
    Feb 20, 2009
    #10
    OP:

    Tell us what year your MacBook is
    What OS you are using
    Whether the MacBook has a platter-based hard drive or an SSD....
     
  11. Slothzilla thread starter macrumors newbie

    Joined:
    Mar 8, 2015
    #11
    2013 Mac Book Pro
    the latest version of Yosemite: 10:10:2
    Platter based hard drive
     

Share This Page