Re: dpkg vs. apt
Tran Tuan Anh <trantuan@comp.nus.edu.sg> writes:
> Could someone briefly tell me what are the difference between those
> two? I read some docs on web but still get lost.
dpkg is the low-level package manager. Given a .deb file, it can
install it, provided that package's dependencies are installed; it can
remove packages, get listings of files in packages, and so on. APT is
a tool that implements higher-level package-manager functionality;
given a package name, it can download that package and all of its
uninstalled dependencies, and then call dpkg to do the actual
installation.
As far as user tools go:
-- dpkg can be used to install a .deb file you have sitting around;
-- apt-get is "the user's 'back-end' to other tools using the APT
library"; if you happen to know a package name, apt-get can
download and install it;
-- 'apt-cache search' will help you find a package name;
-- aptitude is a console UI tool ("kind of like dselect, but with sane
keybindings") that you can use to browse the package listing,
install and remove packages, etc.
I personally very rarely use apt-get/apt-cache directly. I use 'dpkg
-L' to get a listing of files in a package, and 'dpkg -S' to get the
package containing a file. For pretty much everything else, I use
aptitude.
--
David Maze dmaze@debian.org http://people.debian.org/~dmaze/
"Theoretical politics is interesting. Politicking should be illegal."
-- Abra Mitchell
Reply to: