How to Clean the Cache in Ubuntu

Written by melissa worcester
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Clean the Cache in Ubuntu
(Creatas Images/Creatas/Getty Images)

A cache is a group of files. In computer terms, these files are often files that are no longer necessary. They were needed to install a program, but once the program is installed, they are just taking up space. Or they are some of the many temporary files that download when you surf the Internet. In Ubuntu, there is a command line to delete package files left over from application installations. The default Web browser in Ubuntu is Firefox, so you can delete the Internet cache the same way you would when using Firefox in Windows.

Skill level:

Other People Are Reading


  1. 1

    Run "Terminal." Click on "Applications" in the menu bar, select "Accessories" and then select "Terminal."

  2. 2

    Type "sudo apt-get clean" at the prompt in the Terminal window. Hit "Enter." If you have a password on your system, it may prompt you to enter the password, which will not display on screen when you type it and hit "enter."

  3. 3

    Close the Terminal window. The cache will be cleaned and you will not get any message telling you so. Select "Close Window" from the "File" menu in the Terminal window to close it.

  1. 1

    Select "Clear Recent History" from Firefox's "Tools" menu. Or select "Preferences" from the "Edit" menu in Firefox and click on "clear your recent history" in the "History" part of the "Privacy" section. The same dialogue box will pop up in either case.

  2. 2

    Select a time range for which Firefox will remove the selected history. Choose from "last hour," "last two hours," "last four hours," "today" and "everything."

  3. 3

    Select one or more specific items to clear. You can select them all if you want. Your choices include "browsing and downloads," "form search history," "cookies," "cache," "active logins," and "site preferences."

  4. 4

    Click on the "Clear Now" button when you are done making your selections.

  5. 5

    Consider this additional option for Firefox: Select "Preferences" from the "Edit" menu. Select the "Advanced" section of the Preferences dialogue box. Then select the "Network" tab. You can change the amount of disk space allocated for the cache by changing the number in the box. Select the "Clear Now" button to clear the cache.

Tips and warnings

  • If your goal is privacy rather than reclaiming disk space, consider instructing Firefox not to store browsing history, so no one will be able to find out what sites you visit. This is a good setting to use on a public computer. In the "Privacy" section of Firefox's "Preferences" dialogue box, under "History," select "Never Remember History" from the drop-down menu.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.