Delete cache in Ubuntu

Source: Internet
Author: User
Tags delete cache

Linux and windows do not generate useless junk files.
However, during cache upgrade, linux does not automatically delete these files, which still occupies the hard disk!

1. Delete Cache

1. Useful cleanup commands:
Sudo apt-get autoclean // clear the old software Cache
Sudo apt-get clean // clear all software caches
Sudo apt-get autoremove // Delete isolated software that is no longer in use by the System
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:
We can use the following terminal commands:
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.

Appendix:
Temporary File directory for package management:
Package in
/Var/cache/apt/archives
If the download is not completed
/Var/cache/apt/archives/partial

Ii. Delete Software

You can delete ubuntu software by using the "ubuntu Software Center" or "new version", but sometimes it seems faster and better to use commands ~~
Sudo apt-get remove -- purge software name
Sudo apt-get autoremove deletes isolated software that is no longer used by the System
Sudo apt-get autoclean clear old software Cache
Dpkg-l | grep ^ rc | awk {print $2} | sudo xargs dpkg-P clear the residual configuration file

Always clean.

Iii. Delete redundant kernels

1. First, use this command to view the Kernel used by the current Ubuntu System
Uname-

2. Check all the kernels.
Dpkg -- get-selections | grep linux

3. Delete it carefully.
Sudo apt-get remove linux-image-2.6.32-22-generic

Ps: linux-image-xxxxxx-generic is the kernel version to be deleted.
And
Linux-headers-xxxxxx
Linux-headers-xxxxxx-generic can delete all the old kernels in the "xxxxxx" section.

From: somisy.info

 

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.