34

Can someone tell me what the .Trash-1000 folder is and how can I remove/delete it?

It taking up 275 gigs of disk space.

Eliah Kagan
  • 117,780
zippy
  • 341

5 Answers5

25

This is the folder of you paperbin.
If you delete something it will not be deleted from disk. It will be moved to this folder instead.

Try to empty the paperbin or delete the folder with the terminal-command as root:

sudo rm -rf /path/to/folder/.Trash-1000
Seth
  • 58,122
prophecy201
  • 2,690
  • 16
  • 21
  • 3
    This folder contains subfolders "expunged", "files" and "info". What are those used for? – Samir Aug 23 '15 at 10:14
  • 5
    This may break the "move to trash" function of file browsers if /path/to/folder/ is not writable for UID 1000. Better remove its contents – ManuelSchneid3r Apr 10 '18 at 20:12
16

GNOMEish file managers need a place to put the trashed files.

  • Deleted files on your "home" partition go to: /home/username/.local/share/Trash
  • Deleted files on other partitions can't be copied there for performance and space reasons.

So it tries to put them in the /.Trash-$UID folder. Without rw access to that folder, no trash.

Run this bash in the partition root as the user who needs a trash.

sudo mkdir .Trash-$UID && sudo chown $USER:$USER .Trash-$UID

You can delete this folder and secure the partition / to disable that feature.

sudo rm -rf .Trash-xxxx
sodo chown root:root /thepartition
Michael Cole
  • 853
  • 8
  • 22
  • Yes, but it comes back on the next delete. – eduncan911 Oct 06 '20 at 01:09
  • 3
    After you successfully deleted it, you can then create a file ( not a directory! ) called .Trash-1000 That will prevent the directory with the same name from being recreated. The empty file will always have size 0 – Dan Jun 10 '21 at 07:29
1

Answers here provide ways to remove the .Trash-1000 folder itself, but an easier way to make it stop using up space is simply right-clicking on your Trash can and clicking "Empty trash", as the folder simply stores deleted files.

circl
  • 53
0

If you want to keep having a trash bin but delete the files that have been moved there and remain on disk, use:

sudo rm -rf ~/.local/share/Trash/files/*

Note in the above that rm is the command to remove, and the parameters -r means "remove directories and their contents recursively", since by default rm doesn't remove directories. The -f parameter means "ignore nonexistent files and arguments, never prompt".

At the end of the file path ~/.local/share/Trash/files/* is the character * (...read as "star"), which is a regex term that leads to all files and directories under the files/" directory being removed by the command rm.

Side note

If you'd like to learn more about how to use terminal commands to work with files, the default terminal uses an interpreted programming language called "bash". You can use the type man rm within the terminal for more information about the rm command and other common commands.

also...

An alternative method for working with directories when you're at an intermediate stage with gnu linux is gnu emacs and its "dired" package.
0

If you cannot empty your trash, then use this command:

sudo rm -r ~/.local/share/Trash/files/

It will remove trash files recursively.

Dhaval Simaria
  • 795
  • 2
  • 12
  • 29
  • Note that this does not remove the file in the /files directory but deletes the /files directory itself. – Brad West May 26 '23 at 22:00