How to clear system garbage in Ubuntu

Source: Internet
Author: User
Tags linux

Unlike the Windows system, Ubuntu Linux does not produce useless junk files, but in the upgrade cache, Ubuntu Linux does not automatically delete these files, today is to say these garbage file cleanup methods.

1, a very useful cleanup command:

sudo apt-get autoclean--Cleaning up older versions of the software cache

Www.2cto.com

sudo apt-get clean--cleans up all software caches

sudo apt-get autoremove--remove orphaned software that the system no longer uses

These three commands primarily clean up the upgrade cache and the unwanted packets.

2, clean up the cached files of opera Firefox:

LS ~/.opera/cache4

LS ~/.mozilla/firefox/*.default/cache

3, clean Linux under the orphaned packets:

We can use the graphic interface: Gtkorphan

sudo apt-get install gtkorphan-y

Terminal command We can use: Deborphan

sudo apt-get install deborphan-y

4, Uninstall: Tracker

This thing generally I just install Ubuntu will be the first delete tracker he will not only produce a large number of cache files, but also affect the boot speed.  So it's OK to delete it in the new profit. Www.2cto.com

5, delete redundant kernel: must not delete wrong Oh, remember!!

Open Terminal Knock command: dpkg--get-selections|grep Linux

There is the image of the kernel file

To delete old kernel files:

sudo apt-get remove kernel filename (for example: Linux-image-2.6.27-2-generic)

The kernel deletes, frees up space, should be able to release 130-140m space.

Finally, don't forget to look at the current kernel: uname-a

Appendix:

Temporary files directory for package management:

Package in

/var/cache/apt/archives

Did not download the finished in

/var/cache/apt/archives/partial

This column more highlights: http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.