A tutorial on the initial cleanup of Ubuntu systems

Source: Internet
Author: User
Tags locale

If you want to clean your Ubuntu host, you can follow these simple steps to remove all unwanted junk files.

Removing redundant packages

This is another built-in feature, but this time we do not need to use the new Synaptic management software (Package Manager), but in the terminal to achieve the purpose.

Now type the following command in the terminal window:

The code is as follows:

sudo apt-get AutoClean

This activates the package Cleanup command. The job of this command is to automatically erase the. deb package that was cached by the system when you installed or upgraded the program (that is, clear the/var/cache/apt/archives directory, but only obsolete packages). If you need to use the Purge command, simply type the following command in the terminal window:

The code is as follows:

sudo apt-get clean

You can then use the automatic Removal command. The job of this command is to clear those packages that have been installed on the system by a software that has already been uninstalled. To use the automatic removal command, type the following command in the terminal window:

The code is as follows:

sudo apt-get autoremove

Remove unwanted localized data

To do this, we need to install the Localepurge software, which will automatically remove some of the localized data that is not needed (LCTT: translations of various languages). The software is a simple script that reclaims disk space from localized files that are no longer needed and in the space occupied by the localized online manual (man pages). This software will be activated automatically when any apt installation command is run.

Install Localepurge in Ubuntu:

The code is as follows:

sudo apt-get install Localepurge

After installing any software via Apt-get install, Localepurge will remove all online manuals that are not translated and translated using the language set in your system.

If you want to set up localepurge, you need to edit the/ect/locale.nopurge file.

Depending on the software you have installed, this will save you a few megabytes of disk space.

Example:

If I try to install the Dicus software using Apt-get:

The code is as follows:

sudo apt-get install discus

After the software is installed, you will see the following prompts:

The code is as follows:

Localepurge:disk Space Freed in/usr/share/locale:41860k

Remove Solitary packets

If you want to remove the orphan package, you need to install the Deborphan software:

Install Deborphan in Ubuntu:

The code is as follows:

sudo apt-get install Deborphan

Using Deborphan, open the terminal and type the following command:

The code is as follows:

sudo Deborphan | Xargs sudo apt-get-y remove--purge

Use Gtkorphan to remove solitary packets

Gtkorphan (a PERL/GTK2 application for the Debian distribution) is a graphical tool that analyzes the state of the user's installation process and looks for orphaned library files, providing Deborphan with a GUI front-end and the ability to remove packages.

Install Gtkorphan in Ubuntu, open the terminal and run the following command:

The code is as follows:

sudo apt-get install Gtkorphan

A screen shot

Using Wajig to remove solitary packets

Wajig is a simple package management front-end in the Debian package management system. It integrates the scripts in apt, Apt-cache, dpkg,/ETC/INIT.D, etc. through a single command, designed to use simple and rich documentation for all its features.

With the appropriate sudo configuration, most, if not all, of the package installation and creation tasks can be done through a user shell. Wajig also applies to general system management. In addition, a Gnome GUI command Gjig is also included in this package.

Install Wajig in Ubuntu, open the terminal and run the following command:

The code is as follows:

sudo apt-get install Wajig

Debfoster---Track your actions during the installation process

Debfoster will maintain a list of packages that are explicitly required to be installed, but do not include packages that are installed as dependencies on a particular software. The parameters are completely optional, and you can even activate the debfoster immediately after each run of dpkg and/or Apt-get.

Alternatively, you can use Debfoster on the command line to install or remove certain packages. Packages with a suffix of---will be removed, and packages without suffixes will be installed.

If a new package or debfoster notices that the package being relied on as a package is a lone packet, Debfoster will ask you what to do next. If you decide to keep the lone bag, Debfoster will only record and continue the installation process; If you feel that this package is not enough to interest you, it will remove the package after Debfoster asks the question. Further, if your decision makes the other packages a lone bundle, more questions will follow.

Install Debfoster in Ubuntu, open the terminal and run the following command:

The code is as follows:

sudo apt-get install Debfoster

Using Debfoster

To create an initial trace file, you can use the following command:

The code is as follows:

sudo debfoster-q

You can always edit the/var/lib/debfoster/keepers file to define the packages that you want to stay in the system.

To edit this file, you can type:

The code is as follows:

sudo vi/var/lib/debfoster/keepers

To force Debfoster to remove all packages that are not listed on this file, or to install dependencies on packages that are listed in this file, it also adds all packages that are not installed in this list. To perform a related operation based on this list, simply perform the following:

The code is as follows:

sudo debfoster-f

If you need to track your newly installed packages, you need to perform the following commands from time to time:

The code is as follows:

sudo debfoster

Xdiskusage--see where your hard drive space is.

A graphical display of the use of disks by DU. Xdiskusage is a user-friendly program that will show you the usage of all your disks. It was designed on the basis of the "Xdu" program written by Phillip C. Dykstra. Some modifications are made so that it can run the du command for you and display the rest of the disk space, and if you want to know clearly where your disk space is going, it can also generate a PostScript-formatted file called Display.xdiskusage.

To install Xdiskusage in Ubuntu, simply use the following command:

The code is as follows:

sudo apt-get install Xdiskusage

If you want to open this application, you need to use the following command:

The code is as follows:

sudo xdiskusage

Once this application is opened, you will see an interface as shown in the following illustration:

Bleachbit

Bleachbit can quickly release disk space to protect your privacy without tiredness. It frees up caching, deletes cookies, clears internet history, crushes temporary files, deletes logs, and discards garbage that you don't know where it is. Designed for Linux and Windows systems, it supports erasing thousands of applications, such as Firefox, Internet Explorer, Adobe Flash, Google Chrome, Opera, Safari, and more. In addition to simply deleting files, Bleachbit also includes a number of advanced features, such as shredding files to prevent recovery, erasing disk space to hide traces of files deleted by other applications, "dusting" for Firefox, and making it faster. Better than free, Bleachbit is an open-source software.

Install Bleachbit in Ubuntu, open the terminal and run the following command:

The code is as follows:

sudo apt-get install Bleachbit

A screen shot

        Note : more Wonderful tutorials please focus on the triple graphics and text tutorial channels,

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.