Linux – How to Disable Creation of .Trash-1000 Folder

linuxtrashusb-drive

I have a 32 GB USB flash drive. When deleting files from the drive where the drive is plugged into a Ubuntu 16 laptop, it creates a folder called '.Trash-1000'

This .Trash-1000 folder contains two folders which are 'file' and 'info' where file contains the files I have deleted and info contains metadata about those files.

The issue is this .Trash-1000 folder takes up space because it holds a copy of the deleted file. I then have to eventually delete the .Trash-1000 folder when it starts filing up after multiple deletes.

Is there a way to disable this feature on the USB drive?

Best Answer

Have a look at this article.

According to the article, Ubuntu will create such folders when a file is deleted from a USB drive. Presumably this would allow a file to be restored if you accidentally deleted it.

It contains the following solution:

Don't use the delete button only (Otherwise the .Trash-1000 folder will be created)

Press the key combination shift+delete together to delete then Ubuntu won't create a .Trash-1000 folder. (Note: If you delete files and folders this way they are gone forever!)

As alternative you can also use the command line's rm command which will also delete the file directly.

Related Question