For Ubuntu software installation questions: What is the difference between apt-get and dpkg?

Source: Internet
Author: User
The difference between the two is that dpkg bypasses the apt package management database to operate the software package, so you can use apt to install the software package that dpkg has installed again. The system does not know that the software package has been installed before, the previous installation of dpkg will be overwritten. 1. dpkg is used to install the. deb file, but it does not solve the module dependency, and does not care about the software in the Ubuntu software repository. It can be used to install local deb files. 2. apt will solve and install the module dependency issues, and will consult the software warehouse, but will not install the local deb file,

The difference between the two is that dpkg bypasses the apt package management database to operate the software package, so you can use apt to install the software package that dpkg has installed again. The system does not know that the software package has been installed before, the previous installation of dpkg will be overwritten.

1. dpkg is used to install the. deb file, but it does not solve the module dependency, and does not care about the software in the Ubuntu software repository. It can be used to install local deb files.

2. apt will solve and install module dependencies, consult the software warehouse, but will not install local deb files. apt is a software management tool built on dpkg.

Install software package

Dpkg-I package_name.deb // install the local software package. The dependency is not resolved.

Apt-get install package // install the package online

Aptitude install pattern // same as above

Apt-get install package -- reinstall // reinstall the Software package

Apsara reinstall package // same as above

Remove Software Package

Dpkg-r package // delete a software package

Apt-get remove package // same as above

Aptitude remove package // same as above

Dpkg-P // Delete the software package and configuration file

Apt-get remove package -- purge // Delete the software package and configuration file

Apitude purge pattern // same as above

Auto remove Software Package

Apt-get autoremove // Delete unnecessary software packages

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2

This article permanently updates the link address: Http://www.linuxidc.com/Linux/2015-09/123235.htm

Related Article

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.