How to clean useless junk files through Ubuntu Optimization

Source: Internet
Author: User
Unlike Windows systems, UbuntuLinux does not generate useless junk files. However, during cache upgrade, UbuntuLinux does not automatically delete these files. Today we will talk about how to clean these junk files. 1. Very useful cleanup commands: sudoapt-getautocleansudoapt-getcleansudoapt-getautoremove these three commands mainly clean up and upgrade the cache and useless packages.

Unlike Windows systems, Ubuntu Linux does not generate useless junk files. However, during cache upgrade, Ubuntu Linux does not automatically delete these files. Today, we will discuss how to clean these junk files.

1. Useful cleanup commands:

Sudo apt-get autoclean
Sudo apt-get clean
Sudo apt-get autoremove

These three commands mainly clean up and upgrade the cache and useless packages.

2. Clear the cache files of opera firefox:

Ls ~ /. Opera/cache4

Ls ~ /. Mozilla/firefox/*. default/Cache

3. Clear isolated packages in Linux:

In the graphic interface, we can use: gtkorphan

Sudo apt-get install gtkorphan-y

Run the following command on the terminal: deborphan

Sudo apt-get install deborphan-y

4. Uninstall: tracker

Generally, I only need to install Ubuntu and delete tracker first. This will not only generate a large number of cache files, but also affect the boot speed. So you can delete it in Suntory.

5. Delete unnecessary kernels: Do not delete any errors. Remember !!

Run the command dpkg -- get-selections | grep linux on the terminal.

Kernel files with images

Delete the old kernel file:

Sudo apt-get remove Kernel File name (e.g.: linux-image-2.6.27-2-generic)

Delete the kernel and release the space. The space should be-MB.

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

Appendix:

Temporary File directory for package management:

Package in

/Var/cache/apt/archives

If the download is not completed

/Var/cache/apt/archives/partial

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.