Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: How to empty Trash ?

  1. #1
    Join Date
    Aug 2012
    Beans
    28

    Question How to empty Trash ?

    Hello,

    How to empty Trash using terminal ?

    Thanks & Regards
    Last edited by Akhj; March 12th, 2013 at 05:07 PM. Reason: Query has been answered.

  2. #2
    Join Date
    Feb 2013
    Beans
    21

    Re: How to empty Trash ?

    I believe the the command is rm -rf ~/.Trash/*. Hope this helps, good luck.

    Edit: I'm not sure how to enter the code into one of the fancy boxes you will see on other replys in the fourm. Sorry
    Last edited by Malo Kingi; March 9th, 2013 at 09:15 PM.

  3. #3
    Join Date
    May 2011
    Beans
    225
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to empty Trash ?

    My trash folder is at ~/.local/share/Trash/ not at ~/.Trash/ so you may need to use
    Code:
    rm -r ~/.local/share/Trash/*
    However, a safer method would be to install trash-cli with:
    Code:
    sudo apt-get install trash-cli
    and then you can empty the trash with:
    Code:
    trash-empty
    Hint: I alias rm to the trash-put command (provided by the trash-cli package) so that when I delete files from the command line they go to the trash (sudo will override this though). This can save you a lot of hassle if you make a mistake when deleting files.

  4. #4
    Join Date
    Aug 2012
    Beans
    28

    Re: How to empty Trash ?

    Thanks Malo. But i've tried that already and not working.

  5. #5
    Join Date
    Feb 2013
    Beans
    21

    Re: How to empty Trash ?

    Well, hopefully Mr. Shannons command line fu is more help, good luck.

  6. #6
    Join Date
    Aug 2012
    Beans
    28

    Re: How to empty Trash ?

    Thanks Shannon but thats too not working
    P.S. : I don't want to install any package just because i am at learning stage.

  7. #7
    Join Date
    May 2011
    Beans
    225
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to empty Trash ?

    Quote Originally Posted by Malo Kingi View Post
    Edit: I'm not sure how to enter the code into one of the fancy boxes you will see on other replys in the fourm. Sorry
    You do this by enclosing in
    HTML Code:
    [CODE]this is code[/CODE]
    tags. Please ignore the HTML Code header. I don't know of another way to escape the code tags.

  8. #8
    Join Date
    Feb 2013
    Beans
    21

    Re: How to empty Trash ?

    Akhj, are you sure your trash folder resides in the directorys we listed?

  9. #9
    Join Date
    Feb 2013
    Beans
    21

    Re: How to empty Trash ?

    Quote Originally Posted by Mr. Shannon View Post
    You do this by enclosing in
    HTML Code:
    [CODE]this is code[/CODE]
    tags. Please ignore the HTML Code header. I don't know of another way to escape the code tags.
    Thanks Mr. Shannon, it was killing me trying to figure it out knowing it was probably simple.

  10. #10
    Join Date
    May 2011
    Beans
    225
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to empty Trash ?

    Quote Originally Posted by Akhj View Post
    Thanks Shannon but thats too not working
    P.S. : I don't want to install any package just because i am at learning stage.
    What errors did if give you?

    Also, I really recommend you install trash-cli and do it that way. Using rm with the -r flag and especially * is dangerous if you are not careful. You could erase all of your files with a single mistyped command.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •