Clean System garbage under Linux

Source: Internet
Author: User

You can use the following command to clean up the system garbage sudo apt-get AutoClean clean up the old version of the software cache sudo apt-get clean cleanup all software cache sudo apt-get autoremove remove system no longer used by orphaned software execution

sudo nautilus/boot

Delete any files other than the latest kernel (e.g. the 2006-08-17 official kernel is 26, you can delete all old kernel files at the end of the 23,25)

Organize Grub boot Menu

sudo gedit/boot/grub/menu.lst

Remove other Startup items (such as 23,25, etc.) other than the latest kernel

---------------------------------

Unlike Windows, Ubuntu Linux does not produce unwanted junk files, but in the upgrade cache, Ubuntu Linux does not automatically delete these files, and today it is the junk file Cleanup method.

1, very useful cleanup command:

sudo apt-get autocleansudo apt-get cleansudo apt-get autoremove

These three commands mainly clean up the upgrade cache and the garbage packets.

2. Clean up the Opera/firefox cache file:

LS ~/.opera/cache4

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

3. Clean up the orphaned packages under Linux:

In the graphical interface we can use: Gtkorphan

sudo apt-get install gtkorphan-y

Terminal commands we can use: Deborphan

sudo apt-get install deborphan-y

4, Uninstall: Tracker

This thing usually 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 cut it out in the new enrichment.

5, delete the redundant kernel: Do not delete the wrong Oh, remember!!

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

It's the kernel file with the image.

To delete the old kernel file:

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

Kernel deletion, freeing up space, should be able to free 130-140m space.

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

Appendix:

Temporary file directory for package management:

Package in

/var/cache/apt/archives

Not finished downloading in the

/var/cache/apt/archives/partial

Clean System garbage under Linux

Related Article

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.