Previous 1 2 Next 16 Replies Latest reply: Nov 15, 2015 5:27 AM by Sunpillar7
xparrot Level 2 Level 2

I have some old empty folders in my trashcan that I cannot delete. I have tried going to the terminal and typing:


rm -rf ~/.Trash/*


But it then gives me a "Permission denied". I am a Terminal novice, and barely that. I'm not sure if this is tied to Mavericks and how I now have to put in a admin password when dragging things to the trash. Very annoying, I would love to shut that off.

8-Core MacPro, Mac OS X (10.7.2)
  • macjack Level 9 Level 9

    Coud these items be from an external drive?


    YOu need to use sudo for that coomand but first try deleting from the external.


    For the permissions issue try this...

    Choose your Home folder "Get Info" (command-i) and be sure you have "read & write" in the Sharing & Permissions section. Check under "General" section to be sure it isn't locked. If that is correct, launch Applications/Utilities/Terminal and at the prompt copy & paste this command…

    mkdir ~/.Trash

    Press return.

    If you get a message that the folder already exists, copy & paste these commands...

    sudo chown $UID ~/ .Trash

    Press return.

    Enter your admin password (it will be invisible)

    Press return.Then enter

    chmod u+rwx ~/.Trash

    Press return. Log out and back in, or restart.

  • Axeman1020 Level 6 Level 6

    Copy and paste the following into Terminal:


    sudo rm -rf ~/.Trash/*

  • xparrot Level 2 Level 2

    Axeman1020, it asked for my admin password which I entered. It did not delete the files.

  • xparrot Level 2 Level 2



    That worked for my other problem which was having to enter a password when I drag something to the Trash, but my empty folders still exist. The folders were from an external drive.

  • macjack Level 9 Level 9

    Connect the external and delete them.

    This is because it's not in Trash, it's in Trash on the external volume. If it's from a Windows partition boot from that and run Chkdsk.

  • roadrunnersrg Level 1 Level 1

    It doesn't sound like you quite own all of your home drive items (and you should).  This would be causing your trash difficulty as well.


    You can change this graphically, if you aren't big on messing with command line things:


    -Select your Home folder inside the Users folder

    -Get Info from the File Menu

    -Make sure your login is chosen as the owner and that it has Read and Write

    -In the gearbox at the bottom of the Get Info dialog choose "Apply to Enclosed"


    The second and third entries are usually Group and Other and they generally only need Read to this location

  • thomas_r. Level 7 Level 7
    Apple Watch

    The folders were from an external drive.


    Is there any chance that external drive is a Time Machine backup? If so, you may very well have damaged your backups, and if using sudo rm doesn't remove those items, you may have to resort to erasing that external drive completely and starting your backups over from scratch.


    If it's not a Time Machine backup, I would defer to what has already been said.

  • xparrot Level 2 Level 2

    Folders are not from a Time Machine volume. Is it possible they were trashed by another login admin?

  • Eric Root Level 9 Level 9
    Mac OS X



    Trash – Can’t Empty or Move File To Trash


    Trash FAQ          

  • Devecseri Level 1 Level 1

    echo PASSWORD | sudo -S rm -rf ~/.Trash/*



    whenever you want to pass your password to a command you gotta do this ^

  • thomas_r. Level 7 Level 7
    Apple Watch

    That is not true at all! In fact, this is extremely insecure, as it would leave a plaintext copy of your password lingering in the Unix command history file indefinitely. It is not necessary to echo your password to use a "sudo" command.

  • venetsanos Level 1 Level 1

    Hello.its my first post in apple support forum and i wanted to say that the sudo command solved my problem too.

    i had moved a back up of time machine file to the trash (i have an external hard disk) and i couldnt deleted.i used the sudo command and was deleted.nothing else worked.when i entered the password it was blank at the terminal and i assumed that i was doing something wrong.but then i read that this is a normal situation.

    thanks again.

    ps:its my first macbook and just trying to keep up with differences.

    ps2:i reformatted the external drive and took a clean time machine back up.

    conclusion:time machine files MUST NOT be deleted with drag n drop on trash can.just through the time machine menu (star wars...)

  • tbirdvet Level 4 Level 4

    You are correct.  Never delete TM backups as you would normal files.

  • Axeman1020 Level 6 Level 6

    I am glad you got it sorted out.


    New to Mac?

    You may find these useful:

    Mac Basics

    Mac OS X: PC to Mac

    PC to Mac Guide - OS X Tips, Tricks & Tutorials

Previous 1 2 Next