1

I deleted 100gb of files off my desktop the other day and it still seems to be taking up HDD space.

2
  • It doesn't, but you can make it :) Mar 31, 2015 at 16:50
  • Set up a cronjob with bleachbit's command line options, and it'll do everything for you periodically Mar 31, 2015 at 16:56

3 Answers 3

1

By default it doesn't. You can empty it manually by right-clicking on the trash icon in the launcher and then clicking "Empty Trash ...".

If you want it to do this automatically, open a terminal and enter this command:

sudo apt-get install trash-cli

Then open "Startup Applications" from the dash. Click "Add" and enter trash-empty 5 as command, choose some name you like. This will delete all files which are longer than 5 days in your trash every time you log in to your computer.

6
  • Wow... I didn't even notice there was a trash icon on the launcher. I was using rm -rf ~/.local/share/Trash/ Mar 31, 2015 at 16:53
  • 1
    In recent Ubuntu distribution, you don't need third party clients anymore, you can use gio trash and to empty the trash, the command is gio trash --empty.
    – Adrien H
    Aug 20, 2019 at 8:52
  • BUT does that delete ALL trash or just older trash?
    – anthony
    Sep 30, 2019 at 7:38
  • @anthony Look at this example. It only deletes old files.
    – UTF-8
    Sep 30, 2019 at 11:06
  • I was talking about gio trash, not trash-cli commands!
    – anthony
    Oct 1, 2019 at 23:53
1

I deleted 100gb of files off my desktop the other day and it still seems to be taking up HDD space.

Nothing to add to what has been said already, but this is expected because files moved to the trash are not deleted, but just moved to ~/.local/share/Trash. Only by emptying the trash you'll regain your free space

1

No, it does not. The Trash is just a regular folder on your drive (/home/YOURUSERNAME/.local/share/Trash/). "Deleted" files are instead of really deleting just moved to its subfolder files/ and another file in the subfolder info/ is created to provide additional information about it (date of deletion, origin,...). Therefore a trashed file still occupies space on the disk.

The Trash (of which each user account has its own) usually never gets emptied automatically. At least not depending on the time, maybe if it grows too large, but I don't think so. You have to do it manually (right-clicking on its Unity launcher icon or inside your file manager, e.g. Nautilus) or schedule a job to perform it automatically, but I would recommend you to take the old-school way and do it by hand. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.