65

I tried opening Trash by running the command nautilus, but it gives me an error.

Zanna
  • 72,312

4 Answers4

90

The trash folder should be located under:

/home/your_username/.local/share/Trash

So you should be able to access it via:

cd ~/.local/share/Trash

The folder might not exist unless you delete something from the filesystem. In this case you would run into an error (saying that the folder does not exist).

Lucio
  • 19,191
  • 32
  • 112
  • 191
TilmanK
  • 1,023
29

If you want to open Trash using Nautilus run the following:

nautilus trash://
Eric Carvalho
  • 55,453
14

For Ubuntu 18.04 and newer, use gio. For older versions, use gvfs-ls and gvfs-trash.

To read the trash:

gio list trash://
gvfs-ls trash://

To send files or directories to the trash:

gio trash [FILE or DIR]
gvfs-trash [FILE or DIR]

To empty it:

gio trash --empty
gvfs-trash --empty
wjandrea
  • 14,504
7

You can list all the files in the trash by using trash-list. First, install it by running:

sudo apt install trash-cli

Now, you can list the files by running:

trash-list

You may be interested in these other commands too:

Command Description
trash-restore Restore file from trash.
trash Command line trash utility.
trash-empty Empty trash.
trash-list List trashed files.
trash-put Put file in trash
trash-rm Removes files matching a pattern from the trash can.
Flimm
  • 44,031