Purge trash & temporary files
Clearing out your trash and temporary files removes unwanted and unneeded files from your computer, and also frees up more space on your hard drive. You can manually empty your trash and clear your temporary files, but you can also set your computer to automatically do this for you.
Temporary files are files created automatically by applications in the background. They can increase performance by providing a copy of data that was downloaded or computed.
Automatically empty your trash and clear temporary files
Open the Activities overview and start typing Privacy & Security.
Select Settings ▸ Privacy & Security from the results. This will open the Privacy & Security panel.
Click on File History & Trash to open the panel.
Switch on one or both of Automatically Delete Trash Content or Automatically Delete Temporary Files.
Set how often you would like your Trash and Temporary Files to be purged by changing the Automatically Delete Period value.
Use the Empty Trash… or Delete Temporary Files… buttons to perform these actions immediately.
You can delete files immediately and permanently without using the Trash. See Permanently delete a file for information.