Automatically Clear Trash in Ubuntu Linux: Step-by-Step Guide
You can automatically clear your trash in Ubuntu Linux to free up disk space and improve system performance.
Automatic trash clearing involves configuring your system to regularly delete deleted files and temporary application data, preventing your drive from filling up with unwanted remnants.
Ubuntu offers a built-in tool, BleachBit, which allows you to schedule cleanups easily. For instance, you can set it to remove files older than 30 days with just a few clicks.
Temporary program files are generated for quick access and not for long-term storage. Purging these temporary files regularly is key to maintaining a clean and efficient PC.
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 automatic cleaning keeps your computer tidy and frees up storage space without you needing to remember to do it. This guide shows you how to set up Ubuntu to automatically delete these unneeded files.
You can do that manually or set up Ubuntu Linux automatically. Here’s how you can 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.

Alternatively, click the System menu in the top-right corner of your desktop’s top bar.
On the System menu, select Settings, just like you see highlighted below.

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

In the System Settings → Privacy settings panel, open the panel under File History & Trash.
Ubuntu Linux settings 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.

The value can be anything from an hour to up to 30 days.
You can immediately empty the trash and delete temporary files from the screen panel window.

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, you can use the ‘rm’ command to erase all files and folders inside your Trash folder.
Was this guide helpful?
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.
No comments yet — be the first to share your thoughts!