iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Use Ubuntu’s built-in Privacy & Security → File History & Trash control to delete Trash contents automatically. Enable Automatically Delete Trash Content, choose the period offered by your release, and use Empty Trash… when you need the space immediately. The Trash setting is separate from temporary-file cleanup.
What automatic Trash clearing does
When you delete a file through the Ubuntu desktop, it normally moves to Trash instead of being removed immediately. That makes recovery possible, but the file still occupies disk space. Ubuntu’s gio manual states that moving files to Trash does not free filesystem space until the Trash is emptied.
Automatic clearing permanently removes items after the period configured in Ubuntu’s privacy settings. The deletion is destructive: once the item is purged, the normal desktop restore operation is no longer available. Check the Trash for anything you may still need before enabling a short retention period.
Ubuntu treats Trash and temporary files as two different cleanup categories. Enabling automatic Trash deletion does not automatically enable temporary-file deletion, and the temporary-file control should remain off unless you specifically want that additional behavior.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Trash is also different from deleting a file permanently in one operation. A permanent-delete command or file-manager action can bypass Trash entirely, while the automatic setting only governs items that were placed in Trash. Keep a separate backup for files that must be recoverable; Trash is only a temporary holding area.
Set up automatic Trash deletion in Ubuntu Settings
The following route comes from Ubuntu’s GNOME-based desktop help. Labels and available intervals can vary by Ubuntu release or derivative, so select the period actually shown on your computer.
- Open the Activities overview and search for Privacy & Security.
- Open Settings → Privacy & Security.
- Select File History & Trash.
- Turn on Automatically Delete Trash Content.
- Set Automatically Delete Period to the interval you want from the choices displayed by your system.
- Leave Automatically Delete Temporary Files off unless you also want Ubuntu to remove temporary data automatically.
After the toggle and period are set, Ubuntu handles the cleanup according to its desktop service. The official help confirms that a configurable period exists but does not enumerate every interval or guarantee the exact time of day when a cleanup job runs. Therefore, treat the selected value as a retention policy rather than a promise that deletion will happen at a particular clock time.
If you later decide that files should remain recoverable longer, return to the same panel and choose a longer interval or switch Automatically Delete Trash Content off. Disabling the toggle stops future automatic purges; it does not restore items that have already been deleted and does not necessarily empty the Trash immediately.
Choose a retention period without losing useful files
Use a longer period when Trash is also a safety net for work files, downloaded archives, photos, or project folders. A shorter period is appropriate on a small system disk or on a machine where deleted data should not remain recoverable for long. Because Ubuntu releases can expose different choices, the correct procedure is to choose the interval shown in your own Automatically Delete Period menu rather than rely on a value documented for another release.
- Before enabling: open Trash and restore or copy out anything you might need.
- After enabling: remember that an item reaching the configured age can be removed without another confirmation dialog.
- For shared computers: tell other users that the policy is active, since their deleted files may also be purged.
- For backups: do not treat Trash as a backup. Keep a separate backup before allowing automatic deletion.
- For large files: emptying Trash can recover substantial space, but inspect names and original locations before approving the purge.
The period is an age policy, not a quota. The documented control does not promise to empty Trash when a disk reaches a particular percentage or free-space level. If you need a free-space rule, a separate utility with that feature requires release and compatibility checks.
Verify the setting and test safely
After configuring the panel, reopen Settings → Privacy & Security → File History & Trash and confirm that the Trash toggle remains enabled and that the intended period is selected. This simple check catches accidental changes made by another user or after a desktop-settings reset.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesFor a non-destructive test, create a disposable file, move it to Trash, and inspect the Trash normally. Do not shorten the period solely to force an immediate test: Ubuntu’s help does not specify when its cleanup service runs, so an item can remain until the service next performs maintenance. Restore the test file if you want to keep it, or use Empty Trash… only after reviewing the complete contents.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
There is no documented status screen that reports the next purge time. If you need space immediately, perform a manual empty operation rather than waiting for the automatic policy.
Empty Trash immediately when you need disk space
Automatic cleanup may not run immediately, and simply moving additional files to Trash will not reclaim their space. To purge the current contents now:
- Open the desktop file manager and open Trash.
- Review the contents for files that should be restored.
- Choose Empty Trash… and confirm the destructive operation.
Use this command only when you are certain that the listed items are no longer needed. Emptying Trash is the operation that releases the occupied disk blocks; changing the automatic period does not itself remove every existing item immediately.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchIf the file manager shows several storage locations, inspect them before confirming. Ubuntu’s gio documentation explains that Trash location can differ according to where an item resides, and not every filesystem implements Trash. A desktop view or command may therefore represent only the Trash areas supported by the mounted volumes.
Command-line alternatives
Use trash-empty for an immediate or age-based purge
On Ubuntu 24.04 LTS (Noble), the Ubuntu manpage documents trash-empty from package trash-cli, version 0.23.11.10-1. It is a command-line cleanup action, not a background scheduler.
trash-empty
Running the command without an argument removes all items handled by the utility. To remove only items older than a specified number of days, pass the number of days:
trash-empty N
Replace N with the age threshold you intend to use. For example, an age-based invocation is conceptually different from an unconditional purge: the former retains newer items, while the latter removes everything in the utility’s Trash scope. The Noble documentation establishes the command and version above; it does not make that package/version claim for every Ubuntu release, so check the manpage and package availability on older or newer systems before copying the command into a script.
Because the no-argument form is unconditional, run it only under the account and context whose Trash you intend to clear. If several users share a machine, each account can have separate Trash contents. Confirm the target account and inspect files through the desktop or another listing method before automating the command.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Inspect and empty Trash with gio
Ubuntu 22.04 LTS (Jammy) documents the GLib I/O utility gio for Trash operations. List trashed files, including their original locations, before deleting them:
gio trash --list
When the list is clear, empty the Trash:
gio trash --empty
The listing is useful for a safety check because it shows where an item came from. Trash handling can differ by storage location, and not every filesystem supports the Trash concept. As a result, a command may not represent every deleted item on every mounted volume. The Jammy manual also notes that the Trash location can vary depending on where the original item resides.
gio trash --list is an inspection command, not a preview of what an age-based policy would remove. It does not change the contents. By contrast, gio trash --empty is destructive and has no age cutoff in the cited interface, so treat it like the file manager’s Empty Trash… action.
Recommended Free Tools
Understand the limits of trash-empty and gio
trash-emptycan apply an age cutoff, but invoking it does not create a recurring schedule.gio trash --emptyempties Trash but does not provide the age-policy interface documented fortrash-empty.- Both commands are irreversible for the items they purge; list or inspect first when recovery matters.
- Command behavior and package availability are release-specific. The documented version for
trash-emptyis Noble, while the citedgiobehavior is from Jammy. - Neither command guarantees that every mounted filesystem has a Trash area. Storage-specific behavior can leave some deleted items outside the scope you expected.
What about the autotrash utility?
An Ubuntu Trusty manpage for autotrash version 0.1.5-1 describes a policy-oriented utility that can purge by age, enforce minimum or maximum free-space thresholds, perform a --dry-run, and be invoked from a cron schedule. Those features can be useful when you need a free-space rule instead of a simple age period.
However, the cited documentation is for the old Trusty release. It does not establish that the same package is available, maintained, or compatible with current Ubuntu releases. Treat the Trusty cron example as historical guidance only: verify the package, command options, and security implications on your exact release before installing or scheduling it. Do not assume that an old @hourly example will work unchanged on a modern system.
A dry run is especially valuable when a utility supports it because it lets you review candidate files without deleting them. Even then, verify the account, Trash locations, thresholds, and schedule. Do not substitute an old utility for Ubuntu’s current desktop control without a clear reason and a release-appropriate package source.
Desktop setting versus command-line tools
| Approach | Configuration effort | Policy available | Scheduling | Release evidence | Accidental-deletion risk |
|---|---|---|---|---|---|
| Settings → Privacy & Security → File History & Trash | Low; graphical toggle and period selector | Retention period shown by the installed release | Handled by Ubuntu’s desktop behavior; exact run time not stated in the official help | Current stable Ubuntu desktop help | Moderate if the period is too short; review Trash first |
trash-empty |
Low for a one-time command; scripting requires additional setup | All items, or items older than N days |
Not built in; schedule separately if required | Ubuntu 24.04 LTS Noble, trash-cli 0.23.11.10-1 |
High for the no-argument form; lower but still destructive with an age cutoff |
gio trash --empty |
Low for a one-time command | Empty the Trash; no age rule in the cited interface | Not built in | Ubuntu 22.04 LTS Jammy manpage | High unless you inspect with gio trash --list first |
autotrash |
Higher; policy options and scheduler configuration | Age plus free-space thresholds and dry-run support | Examples use cron | Ubuntu Trusty manpage, version 0.1.5-1; current compatibility not established |
Depends on thresholds and schedule; test with a dry run where supported |
For most desktop users, the built-in setting is the least error-prone route because it is visible, directly supported, and does not require maintaining a script. Choose a command-line method when you need repeatable administration, an age threshold expressed in days, or integration with your own maintenance process.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Scheduling a command-line cleanup
trash-empty and gio trash --empty perform cleanup when you invoke them. They do not, by themselves, run every night or every hour. A recurring command therefore requires a scheduler configured separately, with the schedule, user account, environment, and failure handling defined by you.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Before scheduling an unconditional empty operation, use an inspection step such as gio trash --list during testing. Prefer an age-limited policy when the goal is simply to prevent indefinite accumulation. If you use an older utility that supports a dry run, verify its output before enabling deletion and confirm that its package is supported on your release.
Keep scheduled cleanup under the same user context whose Trash you mean to manage. A task running as another account may see a different Trash scope, and a task that runs while a removable volume is unavailable may not affect items stored there. These account and storage details are reasons to test a schedule with harmless, disposable files before relying on it.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshooting automatic Trash cleanup
The File History & Trash section is missing
The documented labels apply to Ubuntu’s GNOME-based desktop. A different Ubuntu flavor, desktop environment, or release may place the controls elsewhere or expose different wording. Search Settings for Privacy & Security and look for a Trash or file-history panel; do not assume that another desktop provides the same switch.
Trash still contains files after the period has elapsed
The official help confirms a configurable period but does not specify the exact execution time of the cleanup job. The service may therefore run later than the moment an item reaches the nominal age. If space is needed now, inspect Trash and use Empty Trash… or a documented command instead of waiting.
Disk space did not increase after deleting files
Deleting through the file manager usually moves the item to Trash, which continues to consume space. Empty the Trash to release that space. Also check whether the item was on a mounted filesystem whose Trash behavior differs; the gio manual notes that Trash support and location vary by filesystem and storage location.
The command is not found
trash-empty belongs to the trash-cli package documented for Noble. A missing command means the package may not be installed or may not be available under that name on your release. Check your release’s package documentation before installing anything. gio is documented separately and may already be present as part of the desktop stack.
Temporary files disappeared unexpectedly
Automatic Trash deletion and automatic temporary-file deletion are separate controls. Return to Settings → Privacy & Security → File History & Trash and check which toggle is enabled. Turn off Automatically Delete Temporary Files if you intended to manage Trash only.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Some files are not listed
Not every filesystem supports the Trash concept, and the Trash location can vary with the original storage location. An item deleted from a mounted volume may therefore be handled differently from an item on the main filesystem. Check the volume’s support and use gio trash --list where appropriate, while remembering that the Jammy documentation does not promise one universal Trash location.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
I changed the period but old items remain
Changing the retention value is a policy change, not an immediate purge command. Existing items can remain until the desktop cleanup service next runs or until you empty Trash manually. Review the contents and use Empty Trash… if you deliberately want an immediate purge.
Safety checklist
- Open Trash and restore anything that may still be needed.
- Confirm that the selected period is visible in your own Ubuntu release.
- Keep automatic temporary-file deletion disabled unless you explicitly want it.
- Use
gio trash --listbefore a command-line purge when location and ownership matter. - Remember that
trash-emptywithout an argument andgio trash --emptyare destructive. - Do not rely on Trash as a backup or as guaranteed protection against data loss.
- Verify package compatibility before using the old Trusty
autotrashdocumentation on a current installation. - Test any scheduled command with disposable files and the intended user account before enabling unattended deletion.
- Check mounted volumes separately when important files were deleted outside the main filesystem.
Frequently Asked Questions
How do I automatically empty the Trash in Ubuntu?
Open Activities, search for Privacy & Security, choose File History & Trash, enable Automatically Delete Trash Content, and select the Automatically Delete Period offered by your Ubuntu release.
Does moving a file to Trash free disk space?
No. Ubuntu’s gio documentation says that moving files to Trash does not free filesystem space until Trash is emptied. Use Empty Trash… or an appropriate documented command to reclaim the space.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Can I set an exact cleanup time of day?
The Ubuntu desktop help documents a configurable retention period but does not specify the cleanup job’s exact run time. Treat the value as an age policy, not a clock-time guarantee.
Will automatic Trash deletion also remove temporary files?
No. Automatically Delete Trash Content and Automatically Delete Temporary Files are separate controls in File History & Trash. Leave the temporary-file option off unless you want that additional cleanup.
Can I recover a file after automatic deletion?
Normal desktop restore works only while the item remains in Trash. Once automatic or manual emptying purges it, that Trash-based recovery path is gone, so check the contents first and maintain separate backups.
What command empties Trash on Ubuntu?
Ubuntu 22.04’s gio manual documents gio trash --empty. Ubuntu 24.04’s Noble manpage documents trash-empty from trash-cli; without an argument it removes all items handled by that utility, while trash-empty N targets items older than N days.
Free tools Windows power users keep installed
One-click scans. No signup required.
Does trash-empty run automatically after I install it?
No. trash-empty performs cleanup when invoked. A recurring policy requires a separate scheduler and careful testing of the account, environment, schedule, and failure behavior.
Why can’t I find File History & Trash?
The documented path is for Ubuntu’s GNOME-based desktop. Other flavors, desktop environments, and releases can use different labels or omit the panel. Search Settings for Privacy & Security and consult documentation for the desktop you installed.
Is autotrash safe to use on modern Ubuntu?
The cited autotrash page is an Ubuntu Trusty manpage for version 0.1.5-1. It describes age, free-space, dry-run, and cron features, but does not establish current availability or compatibility. Verify the package and options for your exact release before using it.
The Bottom Line
For a supported desktop setup, enable Automatically Delete Trash Content under Settings → Privacy & Security → File History & Trash, choose the period shown on your system, and review Trash before enabling a short retention window. Empty Trash manually when space is urgent. Use gio or Noble’s documented trash-empty only when you understand their release-specific scope and destructive behavior; treat the old Trusty autotrash example as unverified on current Ubuntu.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

