Skip to content
Follow
Ubuntu Linux

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

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

Automatic trash clearing in Ubuntu deletes old files from your Trash folder on a set schedule so you never run out of disk space. Ubuntu can empty the trash for you every day, week, or month without you having to remember to do it yourself.

Old deleted files pile up fast and waste valuable storage space on your hard drive. Setting up this built-in feature takes less than a minute and keeps your computer running fast.

⚡ 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 the computer tidy and frees up storage space without requiring manual intervention. This guide explains how to configure Ubuntu to purge these unneeded files automatically.

Manual deletion remains an option, or the operating system can handle the cleanup on a schedule. Here is how to configure the system to empty the trash and remove unneeded files.

The System Settings panel acts as the main hub for managing configurations, user accounts, and software updates.

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

Alternatively, click the System menu in the top-right corner of the 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.

Operating system settings can automatically delete trash content and temporary files, freeing up disk space and preventing the drive from filling up. Toggle the "Automatically Delete Trash Content" and "Automatically Delete Temporary Files" options to manage this function.

Ubuntu automatically delete trash configuration option enabled
ubuntu linux automatically delete trash

Set how often trash and temporary files undergo purging by changing the Automatically Delete Period value.

The interval ranges from an hour up to 30 days.

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

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

Configuration is now complete, and the Settings app can be closed.

Summary:

  • 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 bypass the trash bin entirely, the rm command removes files and folders from the system immediately.

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 Install osTicket with Apache on Ubuntu Linux
CMS How to Install osTicket with Apache on Ubuntu Linux
How to Setup osTicket with Nginx on Ubuntu Linux
CMS How to Setup osTicket with Nginx on Ubuntu Linux
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

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

Leave a Comment

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