I recently updated my Ubuntu version to 12.04.

I have aliased rm to the command trash, and now that I have upgraded, there is no longer a command called trash. Is there an equivalent for 12.04? I just want to move files to a trash can before I delete them, so I don't go delete my all of my code, which I have done before.

  • Could you check whether the package trash-cliis installed in your system?
    – papukaija
    Jul 3, 2013 at 0:18

2 Answers 2


Try installing the trash-cli utility:

sudo apt-get install trash-cli


trash-put           trash files and directories.
trash-empty         empty the trashcan(s).
trash-list          list trashed files.
trash-restore       restore a trashed file.
trash-rm            remove individual files from the trashcan.</pre>

For more information, check the GitHub documentation


The comment above seems outdated or wrong. It seems that list-trash -> trash-list

Here is what i have in my rc file

  • alias del='trash'
  • alias dell='trash-list'
  • alias undel='trash-restore'
  • 2
    If you have a correction to an existing an answer, please suggest an edit to do so
    – muru
    Jan 19, 2021 at 7:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .