36

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.

1
  • Can you post the output of this command: ls -ld ~/.Trash-1000
    – koni_raid
    Commented Apr 17, 2013 at 9:09

7 Answers 7

28

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
2
  • 3
    This folder contains subfolders "expunged", "files" and "info". What are those used for?
    – Samir
    Commented Aug 23, 2015 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 Commented Apr 10, 2018 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
2
  • Yes, but it comes back on the next delete.
    – eduncan911
    Commented Oct 6, 2020 at 1: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
    Commented Jun 10, 2021 at 7: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.

1

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.

1
  • Note that this does not remove the file in the /files directory but deletes the /files directory itself.
    – Brad West
    Commented May 26, 2023 at 22:00
0

Use autotrash program from https://github.com/bneijt/autotrash with -T options, eg: autotrash -d 30 -T /mnt/share/.Trash-1000

0

If you are using Dolphin, you can use Shift + Delete while your files are selected, which will bypass the Trash folder entirely and remove the files. This can also be used to delete select files in the .Trash-1000/files directory. Also make sure to delete the corresponding files in the .Trash-1000/info folder.

Otherwise, cd into the directory and use sudo rm -rf .Trash-1000/files/* .Trash-1000/info/* as others have mentioned before.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.