Apt-get, aptitude, and synaptic software management tools are compared. 1. What is apt-get? Apt-get is a linux Command, applicable to deb package-managed operating systems. It is mainly used to automatically search, install, upgrade, and uninstall software or operating systems from the software warehouse on the Internet. Is the package management tool of debian and ubuntu, which is similar to the yum tool in red hat. The apt-get command generally requires the root permission for execution, so it is generally followed by The sudo command example: sudo apt-get xxxx2, apt command usage packagename refers to the package name apt-get update in/etc/apt/sources. run this command after list or/etc/apt/preferences. In addition, you need to regularly run this command to ensure that your package list is up-to-date. Apt-get install packagename install a new package (see aptitude below) apt-get remove packagename uninstall an installed package (keep the configuration document) apt-get remove -- purge packagname uninstall an installed package (delete configuration document) apt-get autoremove packagename same as above, A little more thorough than the one mentioned above: dpkg -- force-all -- purge packagename some software is hard to uninstall and can be used even if it stops other software applications, but it is a little risky. Apt-get autocleanapt backs up installed or unloaded software on the hard disk, so if space is required, this command can delete the software you have deleted. apt-get clean will also delete the backup of the installed software, but this will not affect the use of the software. Apt-get upgrade can use this command to update the software package. apt-get upgrade can not only update the software package from the released version with the same version number, but also update the software package from the released version of the new version number, although the recommended command for implementing the next update is apt-get dist-upgrade, it is useful to add the-u option when running the apt-get upgrade command (I .e: apt-get-u upgrade ). This option enables APT to display the complete list of updatable software packages. Without this option, you can only update it blindly. APT downloads the latest versions of each software package and installs them in a proper order. Note that you should first run apt-get update to update the database before running this command. Update any installed software packages. [1] apt-get dist-upgrade: upgrade the system to the new version apt-cache search string search for the dpkg-l package-name-pattern string in the package list to list any pattern matching software Package. If you do not know the full name of the software package, you can use "* package-name-pattern *". Aptitude carefully checks installed or available software packages. Similar to apt-get, aptitude can be called through command lines, but it is limited to some commands-the most common commands are installation and uninstallation. Because aptitude knows more information than apt-get, it is more suitable for installation and uninstallation. Apt-cache showpkg pkgs displays the package information. Apt-cache dumpavail prints a list of available software packages. Apt-cache show pkgs displays package records, similar to dpkg-print-avail. Apt-cache pkgnames prints the name of any package in the package list. Dpkg-S file: Which package is installed. Dpkg-L package lists any documents in the software package. Dpkg-l lists all installed software packages apt-file search filename to find software packages that contain specific documents (not necessarily installed). The document names of these documents contain the specified strings. Apt-file is a separate software package. You must first install apt-get install and then run apt-file update. If apt-file search filename outputs too much content, you can try to use apt-file search filename | grep-w filename (only display the file names in which the specified string appears as the complete word) or similar methods, such: apt-file search filename | grep/bin/(only show documents in folders such as/bin or/usr/bin. If you are looking for a specific execution document, this is helpful) apt-get autoclean regularly runs this command to clear packages that have been uninstalled. deb document. In this way, you can release a large amount of disk space. If your requirements are urgent, you can use apt-get clean to release more space. This command will delete the. deb document that has installed the software package. In most cases, you will not use these. debs documents, so if you feel overwhelmed by insufficient disk space, this method may be worth a try. Aptitude: aptitude is a magical Software Package Manager in the Debian GNU/Linux system. Based on the well-known APT mechanism, aptitude integrates all the functions of dselect and apt-get, and provides more features, especially in dependency processing. Like apt-get, aptitude is a powerful package management tool in Debian and its derivative systems. Unlike apt-get, aptitude is better in dealing with dependency issues. For example, aptitude deletes the packages it depends on when deleting a package. In this way, useless packages will not be left in the system, and the whole system will be cleaner. The following are some common aptitude commands for your reference only. 1. Command function aptitude update Available package list aptitude upgrade available package aptitude dist-upgrade system to new release version aptitude install pkgname installation package aptitude remove pkgname Delete package aptitude purge pkgname Delete package and its configuration file aptitude search string search package aptitude show pkgname display package details aptitude clean Delete downloaded package file aptitude autoclean Delete only expired package files aptitude and apt-get are the same, it is a powerful package management tool in Debian and its derivative systems. Unlike apt-get, aptitude is better in dealing with dependency issues. For example, aptitude deletes the packages it depends on when deleting a package. In this way, useless packages will not be left in the system, and the whole system will be cleaner. The following are some common aptitude commands for your reference only. Command function aptitude update available package list aptitude upgrade available package aptitude dist-upgrade system to new release version aptitude install pkgname installation package aptitude remove pkgname Delete package aptitude purge pkgname Delete package and its configuration file aptitude search string search package aptitude show pkgname display package details aptitude clean Delete downloaded package file aptitude autoclean Delete only expired package files 2. aptitude definition and introduction aptitude, open your favorite terminal and enter the following command. # The main view of aptitudeaptitude is organized in a very organized manner and the interface layout is refreshing. The upper window lists the packages sorted by category and their status in the local system. Aptitude is organized in a tree structure, and relevant nodes are connected by lines. you can use the arrow keys, [PageUp], and [PageDown] for locating. [Return] or [Enter] is used to expand or collapse a node. the open view of aptitude is divided into four columns: package status and request action, package name, current installation version (or de> <de> nonede> de>), and the latest version. status of the software package in the aptitude package list: v virtual B damaged u unpack C pre-configure H pre-install c unmount not clear p Clear Software Package I already installed E internal error request operation in the aptitude package list: h keep p clear d Delete (uninstall) B damaged I install r reinstall u upgrade 3. Quick Start for any program, the first thing you know is how to exit. -- in the main view of aptitude, type [q] (quit) to exit aptitude. any time you type [?] (Help. aptitude is based on the apt mechanism, so you need to correctly configure sources before further operations. list file. make sure that the package list is updated in a timely manner. the [u] (update) command is designed for this purpose, which is similar to the apt-get update operation. if a New software package appears (that is, the software package still appears when the previous software package list is updated), it is displayed under the New Packages option. you can type the [f] (forget that packages are new) command to clear them to available package options. move the cursor to the row you are interested in, and press enter to expand the options. after a software package is selected, information about the software package appears at the bottom of the screen. to view more detailed information, enter [I] (information ). type [q] (quit) to exit the information display screen. for Packages not installed (in New Packages or Not Installed Packages region). After selecting the region, type [+] (add package) to indicate installation. you can maintain, delete, or clear installed software packages. maintaining [=] (hold) means to keep the existing version of the software package, and do not upgrade it. delete [-] (remove package) to mark the installed package as deleted. the [_] (purge package) command marks the package as clear. once you have marked the software package you are interested in, you can type [g] (go) to save the modification and make it take effect. 4. You can browse the software package selection and press the corresponding key to perform the operation: de> [+] de> select the software package to be installed. De> [-] de> select the software package to be deleted. De> [_] de> select the software package to be cleared. De> [=] de> keep the current version of the software package to prevent it from being upgraded. De> [:] de> lock the software package only during the aptitude session. De> [L] de> request to reinstall the software package. De> [M] de> mark the software package as automatic installation. The automatically installed package is automatically deleted when the manually installed package has no dependency on it. De> [m] de> mark the software package as manual. De> [R] de> request to reconfigure the software package. De> [I] de> request to install the software package immediately (depending on the package) and temporarily lock other software packages for upgrade and installation. The function is the same as apt-get install de> <package> de>. De> [F] de> do not install software packages of a specific version. However, it is normal for later versions. De> [B] de> call reportbug to report a software package error. De> [C] de> download and display the change log of a software package. De> [g] de> enter the preview window for all request changes. If you type this key on the preview screen, the change operation is performed. De> [d] de> query related software packages: suggest/recommanded/dependsde> [r] de> query dependent package de> [/] de> Search de> [\] de> continue searching for synaptic introduction to Synaptic) is a graphical front-end of apt, a package management tool for debian and its derivative versions, such as the Ubuntu Linux operating system. It combines simple graphical operations with the powerful functions of the apt-get command line tool. You can use the new software package to install, delete, configure, and upgrade the software package list, browse, sort, search, and manage the software repository, or upgrade the entire system. You can perform a series of operations to form an operation queue and execute them together. The new version will prompt you for possible dependencies (additional software packages required for the software package you selected) and conflicts between the software packages you selected and those installed in the system.