Why is there no more ~/.Trash?

I remember the nice mv somefile ~/.Trash command but that folder does not exist on newer Ubuntus. Does anyone know why?

You can find it here. ~/.local/share/Trash/

Answered By: aneeshep

According to the freedesktop.org Trash Specification:

For every user a “home trash” directory MUST be available. Its name and location are $XDG_DATA_HOME/Trash ; $XDG_DATA_HOME is the base directory for user-specific data, as defined in the Desktop Base Directory Specification.

If the environment variable $XDG_DATA_HOME is either not set or empty, ~/.local/share is used. So by default, the trash folder is ~/.local/share/Trash.

Regardless, the easiest and best way to trash a file from the command line is to use the trashInstall trash-cli

Use it like you would use rm:

trash somefile.txt

This is better than just mv‘ing a file into ~/.local/share/Trash because it stores metadata such as where the file was originally so you can restore (un-delete) it if need be.

Answered By: Isaiah

it is because of the latest XDG Base Directory Specification: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

Answered By: Praweł
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.