[Switch] Debian installation and uninstallation package command (APT & dpkg)

Source: Internet
Author: User

Transferred from:ZhangjunhdBlog

1. APT commands
Apt-cache search ------ package search package
Sudo apt-Get install ------ package installation package
Sudo apt-Get remove ----- package Delete package
Sudo apt-Get remove -- purge ------ package: delete a package, including deleting a configuration file.
Sudo apt-Get update ------ update source
Sudo apt-Get upgrade ------ Update installed packages
Sudo apt-Get dist-upgrade --------- upgrade the system
Sudo apt-Get dselect-upgrade ------ upgrade with dselect

If the system contains software packages such as-Dev, we recommend that you use the following dselect Operation Method to refine the control software package.
# Dselect update # complete this step before Upgrade
# Dselect select # select additional software package
When running dselect, all current software packages are selected. dselect will prompt you to add additional software packages based on depends, suggests, and recommends. If you do not want to add any software packages, just enter Q to exit dselect.
# Dselect install
During installation, you must answer some questions about the software package configuration and prepare your notebook to take some time to handle them.

Apt-Cache depends ------- package for dependency usage
Apt-Cache rdepends ------ package understands a specific dependency (view which packages are dependent on this package)
Sudo apt-Get build-dep ------ package installation-related compiling environment
Apt-Get source ------ package download the source code of the package)
Sudo apt-Get Clean & sudo apt-Get autoclean ----- clear the archive of downloaded files & only clear outdated packages
Sudo apt-Get check ------ check for any corrupted Dependencies

2. Main dpkg commands
Dpkg-I <package. Deb> ------ install a Debian package file

Dpkg-C <package. Deb> ------ list the content of <package. Deb>

Dpkg-I <package. Deb> ------ extract package information from <package. Deb>

Dpkg-r <package> ------ remove an installed package

Dpkg-P <package> ------ completely clear an installed package. Unlike remove, remove only deletes data and executable files, and purge also deletes all preparation files.

Dpkg-L <package> ------ list all the files installed in <package>. (Dpkg-C to check the content of A. Deb file)

Dpkg-S <package> ------ displays the information of the installed package. (APT-Cache displays the package information in the Debian archive, and dpkg-I displays the package information extracted from A. Deb file)

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.