A detailed description of the APT command set under Linux

Source: Internet
Author: User


Apt command usage packagename refers to the name of the package Apt-get update is modified /etc/apt/sources.list or/etc/apt/preferencesThen run the command. In addition, you need to run this command regularly to ensure that your package list is up-to-date. Apt-get Install PackageName installs a new package (see the Aptitude) apt-get Remove PackageName Uninstall an installed package (keep the configuration document) uninstall an installed package (delete configuration document) Apt-get Autoremove PackageName Ibid, more than the above to remove a bit dpkg --force-all--purge PackageName Some software is difficult to uninstall, but also to prevent the application of other software, you can use this, but a bit risky. Apt-get AUTOCLEANAPT the installed or unloaded software is backed up on the hard disk, so if space is needed, can let this command to delete the software you have deleted apt-get Clean this command will install the software backup also deleted, but this will not affect the use of the software. Apt-get upgrade can use this command to update the package, Apt-get upgrade not only update the package from the release of the same version number, but also update the package from the release version of the new version number, although the recommended command to implement the latter update is Apt-get Dist-upgrade; It is useful to add the-u option when running the Apt-get Upgrade command (that is, apt-get-u upgrade). This option allows apt to display a complete list of updatable packages. Without this option, you will only be able to update blindly. Apt Downloads the latest updated version of each package and installs them in a reasonable order. Note You should run the Apt-get update update database before you run the command. Update any installed packages. [1]apt-get Dist-upgrade upgrading the system to a new version Apt-cache search string searching for strings in the package list dpkg-l Package-name-patternLists any packages that match the pattern. If you do not know the full name of the package, you can use "*package-name-pattern*". Aptitude Detailed view of installed or available packages. Similar to Apt-get, aptitude can be called by command-line mode, but only for certain commands-the most common are installation and uninstallation commands. Since aptitude has more information than apt-get, it can be said that he is more suitable for installation and uninstallation. Apt-cache showpkg pkgs Displays package information. Apt-cache DumpavailPrint the list of available packages. Apt-cache Show pkgs shows the package record, similar to Dpkg–print-avail. Apt-cache Pkgnames the name of any package in the Print package list. Dpkg-s file This document belongs to which installed package. The DPKG-L package lists any documents in the packages. DPKG-L List all installed packages

A detailed description of the APT command set under Linux

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.