Linux command Tools apt-get (1)

Source: Internet
Author: User

The Advanced Package Tool, aka Apt-get, is an application Manager for UNIX and Linux systems. Originally released in 1998, it was used to retrieve the application and load it into a Debian Linux system. One of the reasons for Apt-get's fame is its excellent ability to solve software dependencies. It typically uses a. deb-formatted file, but it can be modified to process Red Hat's package Manager (RPM) files using apt-rpm. (from Baidu Encyclopedia)

Apt-get Update

In modifying /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) apt-get remove--purge PackageName Uninstall an installed package (delete configuration document) Apt-get Autoremove PackageName Delete package and its dependent package apt-get autoremove--purge packagname Delete package and its dependent package + configuration file, a bit more than the above to be removed completely 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-getapt-get AutoCleanApt will back up the installed or unloaded software on the hard drive, so if space is needed, you can allow this command to delete the backup of the software you have uninstalled.apt-getapt-get CleanThis command will also remove the backup of the installed software, but this will not affect the use of the software.Apt-getapt-get UpgradeYou can update the package with this command, Apt-get upgrade can update the package not only from the release version of the same version number, but also 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 you run 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 running the command to update any installed packages.[2]Apt-getapt-get Dist-upgradeUpgrade the system to a new version.Apt-getapt-cache Search StringSearches for a string 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*".Apt-getaptitudeReview the 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-getapt-cache showpkg pkgsDisplays package information. Apt-cache DumpavailPrint the list of available packages.Apt-getapt-cache Show pkgsDisplays the package record, similar to Dpkg–print-avail.Apt-getapt-cache pkgnamesThe name of any package in the Print package list.apt-getdpkg-s FileThis document belongs to which installed package.Apt-getdpkg-l PackageLists any documents in the package.apt-getdpkg-lLists all installed packages.apt-getapt-file Search filenameFind packages that contain specific documents (not necessarily installed) that contain the specified string in the document name. The Apt-file is a separate package. You must first install him using Apt-get installed, and then run Apt-file update. If apt-file search filename outputs too much content, you can try using Apt-file search FileName | grep-w filename (the name of the document that displays only the specified string as the complete word) or a similar method, for example: Apt-file search FileName | Grep/bin/(it is helpful to show only documents located in these folders, such as/bin or/usr/bin, if you are looking for a specific executable document).apt-getapt-get AutoCleanRun this command regularly to clear the. Deb documentation for those packages that have been uninstalled. In this way, you can free up a lot of disk space. If your needs are urgent, you can use apt-get clean to free up more space. This command will remove the. Deb document that has the software package installed. In most cases you will not be able to use these. Debs documentation, so if you are overwhelmed by the lack of disk space, this approach may be worth a try.[3]

Linux command Tools apt-get (1)

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.