What is the difference between apt-get and dpkg?

I have several questions regarding apt-get vs. dpkg.

  • Do they install to the same place?
  • Is info from these tools 1 to 1 with each other?
  • Is there any difference in the commands utility?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

apt-get makes use of dpkg to do the actual package installations. So in a sense they’re “installing” to the same place.

I would always use apt-get to do any package management since this is the tool that understands how to source packages from remote repositories and provides capabilities for searching the meta data related to packages either locally or remotely.

That being said there are times where you’ll have to make use of dpkg to perform queries against the system to find out information about the packages that are installed.

The major reason to use apt tools though is for the dependency management. The apt tools understand that in order to install a given package, other packages may need to be installed too, and apt can download these and install them, whereas dpkg does not.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x