In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to clean up the junk files of the Ubuntu system". In the daily operation, I believe that many people have doubts about how to clean up the junk files of the Ubuntu system. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "how to clean up the junk files of the Ubuntu system". Next, please follow the editor to study!
Remove redundant software packages
This is another built-in feature, but this time we do not have to use the new package management software (Synaptic Package Manager), but to achieve the goal in the terminal.
Now, type the following command in the terminal window:
The code is as follows:
Sudo apt-get autoclean
This activates the packet cleanup command. What this command does is automatically clear the .deb packages that are cached by the system when you install or upgrade the program (that is, clear the / var/cache/apt/archives directory, but only obsolete packages). If you need to use the clear command, simply type the following command in the terminal window:
The code is as follows:
Sudo apt-get clean
Then you can use the automatic remove command. What this command does is to remove packages that are installed as dependencies by some uninstalled software in the system. To use the automatic remove command, type the following command in the terminal window:
The code is as follows:
Sudo apt-get autoremove
Remove unwanted localization data
To do this, we need to install the localepurge software, which will automatically remove some unwanted localization data (LCTT translation). This software is a simple script that reclaims disk space from localized files and localized online manuals (man pages) that are no longer needed. This software will be automatically activated 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 through apt-get install, localepurge will remove all translation files and online manuals that are not in the language set up 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 several trillion 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 prompt:
The code is as follows:
Localepurge: Disk space freed in / usr/share/locale: 41860K
Remove isolated packet
If you want to remove orphan packages, 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 orphaned packets
GtkOrphan (a Perl/Gtk2 application for debian distributions) is a graphical tool that analyzes the status of the user's installation process and looks for isolated library files. It provides a GUI front end for deborphan and has the ability to remove software packages.
Install GtkOrphan in Ubuntu, open the terminal and run the following command:
The code is as follows:
Sudo apt-get install gtkorphan
A screenshot
Remove orphaned packets using Wajig
Wajig is a simple software package management front end in Debian package management system. It integrates scripts from apt, apt-cache, dpkg, / etc/init.d, etc., through a single command, and is designed to be easy to use and provide rich documentation for all its functions.
With proper sudo configuration, most, if not all, of the tasks such as package installation and creation can be done through a user shell. Wajig is also suitable for 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 not those that are installed as dependencies of a software. The parameters are completely optional, and you can even activate debfoster immediately after each run of dpkg and / or apt-get.
In addition, you can use debfoster on the command line to install or remove certain packages. Packages with the suffix-will be removed, while packages without a suffix will be installed.
If a new package or debfoster notices that the package that is a dependency of a package is an isolated package, debfoster will ask you what to do next. If you decide to keep the orphan package, debfoster will only record and continue the installation process; if you feel that the package is not enough to interest you, it will remove the package after debfoster asks this question. Further, if your decision makes other packages stand alone, 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
Use 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 you want to stay in the system.
To edit this file, type:
The code is as follows:
Sudo vi / var/lib/debfoster/keepers
To force debfoster to remove all packages that are not listed in this file, or to install as dependencies for some packages listed in this file, it will also add all packages that are not installed in this list. To perform the relevant actions according to this list, simply execute:
The code is as follows:
Sudo debfoster-f
To track your newly installed package, you need to execute the following command from time to time:
The code is as follows:
Sudo debfoster
Xdiskusage-check where your hard drive space has gone
A du that graphically shows disk usage. Xdiskusage is a user-friendly program that will show you the use of all your disks. It is based on the "xdu" program written by Phillip C. Dykstra. Some modifications have been made so that it can run the "du" command for you and display the remaining space on the disk, and if you want to know exactly where your disk space is going, it can also generate a file called display.xdiskusage in PostScript format.
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 the application is opened, you will see the interface shown in the following figure:
Bleachbit
BleachBit can quickly free up disk space and tirelessly protect your privacy. It can release caches, delete cookie, erase Internet Internet history, smash temporary files, delete logs, and throw away trash that you don't know where it exists. Designed for Linux and Windows systems, it supports erasing and cleaning thousands of applications, such as Firefox, Internet Explorer, Adobe Flash, Google Chrome, Opera, Safari, and so on. In addition to simply deleting files, BleachBit includes many advanced features, such as shredding files to prevent recovery, erasing disk space to hide traces of files deleted by other applications, and "dusting" Firefox to make it faster. Better than free, BleachBit is 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 screenshot
At this point, the study on "how to clean up the junk files of the Ubuntu system" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.