Skip to content
Follow
Ubuntu Linux

Automatically Clear Trash in Ubuntu Linux: Step-by-Step Guide

Richard
Written by
Richard
Sep 3, 2022 Updated Jul 14, 2026 2 min read
Enable Automatic Suspension in Ubuntu Linux Easily
Enable Automatic Suspension in Ubuntu Linux Easily

Automatically clearing trash in Ubuntu Linux deletes old files and temporary data regularly to save disk space.

This process ensures your computer runs smoothly by removing junk that accumulates over time without you needing to do it manually.

For example, Ubuntu can be set to remove files from your trash that are older than 30 days using a simple tool.

Keeping your system clean prevents unwanted files from filling up your storage, which can slow down your PC.

⚡ Quick Answer

Automatically clear your trash in Ubuntu Linux by opening System Settings, navigating to Privacy, then File History & Trash. Toggle “Automatically Delete Trash Content” on and set your desired deletion period.

How to automatically delete temporary files in Ubuntu Linux

Ubuntu Linux can automatically delete temporary files and clear your trash bin. This keeps your computer tidy and frees up storage space, so you don’t have to remember to do it manually. This guide explains how to set up Ubuntu to automatically delete these unneeded files.

Manual deletion is an option, or you can set up Ubuntu Linux automatically. Here’s how to configure Ubuntu Linux to automatically empty your trash and remove unneeded files.

Ubuntu Linux centralizes most settings in the System Settings panel. This panel allows you to manage system configurations, create new users, and update software.

Ubuntu Linux Activities overview screen with applications menu
ubuntu linux activities overview

Alternatively, click the System menu in the top-right corner of your desktop’s top bar.

On the System menu, select Settings.

Ubuntu system menu top bar showing Settings option
ubuntu linux system menu top bar settings

Click the Privacy tile to open the panel in the Settings app.

Ubuntu Privacy settings tile expanded in System Settings
ubuntu linux privacy tile expand

In the System Settings → Privacy settings panel, find and open the panel labeled File History & Trash.

Ubuntu Linux settings can automatically delete trash content and temporary files, freeing up disk space and preventing your drive from filling up. You can turn the "Automatically Delete Trash Content" and "Automatically Delete Temporary Files" options on or off to manage this function.

Ubuntu automatically delete trash configuration option enabled
ubuntu linux automatically delete trash
⚠️Warning
Set how often you would like your Trash and Temporary Files to be purged by changing the Automatically Delete Period value.

The value can be anything from an hour to up to 30 days.

Users can also manually empty the trash and delete temporary files from the settings window for immediate cleanup.

Ubuntu option to manually empty trash and delete temporary files
manually empty trash delete temporary files

That should do it! You can now close the Settings app.

Conclusion:

  • Clearing out trash and temporary files is essential for optimizing the performance and freeing up space on your Ubuntu Linux computer.
  • Ubuntu Linux allows users to automatically delete trash content and temporary files through the System Settings panel.
  • The System Settings panel allows to toggle the automatic deletion of trash content and temporary files and specify the deletion frequency.
  • Users can also manually empty the trash and delete temporary files from the screen panel window for immediate cleanup.

How do I permanently delete Trash in Linux?

To permanently delete trash in Linux, use the ‘rm’ command to erase all files and folders within your Trash folder.

Was this guide helpful?

Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

📚 Related Tutorials

How to Setup Fail2ban on Ubuntu Linux
Ubuntu Linux How to Setup Fail2ban on Ubuntu Linux
How to Install OpenLiteSpeed on Ubuntu Linux
Ubuntu Linux How to Install OpenLiteSpeed on Ubuntu Linux
How to Install Apache on Ubuntu Linux
Ubuntu Linux How to Install Apache on Ubuntu Linux
How to Upgrade Ubuntu Linux
Ubuntu Linux How to Upgrade Ubuntu Linux

No comments yet — be the first to share your thoughts!

Leave a Comment

Your email address will not be published. Required fields are marked *