The Disappearing Trash
In Ubuntu, the Trash (or Rubbish Bin) acts as a safety net. When you delete a file from your file manager, it isn’t immediately destroyed; it is moved to a hidden `.local/share/Trash` directory. By default, Ubuntu’s privacy and history settings are configured to automatically permanently delete any file that has been sitting in the Trash for more than 30 days. This automatic housekeeping helps prevent your hard drive from filling up with forgotten garbage. However, if you use the Trash bin as a temporary holding area or an archive of “maybe I’ll need this later” files, a 30-day silent deletion policy can result in catastrophic data loss.
Disabling Automatic Trash Emptying
To ensure your deleted files stay in the bin indefinitely and stop Ubuntu from automatically emptying the Trash after a set period, you must adjust the system’s Privacy settings.
Open the GNOME Settings application (click the gear icon in your system menu). In the left-hand navigation sidebar, scroll down and click on Privacy. In the main window, click on File History & Trash. Look for the section labeled “Trash & Temporary Files.” You will see a toggle switch next to Automatically empty Trash. Click this toggle to switch it to the Off position. (If you want to keep the feature but extend the grace period, you can leave it on and change the dropdown menu below it from “30 days” to a longer duration). With the toggle off, your Trash bin will grow indefinitely until you manually right-click its icon and select “Empty Trash.”