[AuckLUG] Settle an arguement for me! apt-get, apititude and dpkg

Martin Bähr mbaehr at email.archlab.tuwien.ac.at
Sun Jun 24 14:07:15 NZST 2007


On Sun, Jun 24, 2007 at 10:18:52AM +1000, Trent Murray wrote:
> Q. a) What is the difference between the following tools and when or where
> they should be used in preference of the others.
> 
> 1. apt-get
> 2. aptitude
> 3. dpkg
> Also can they be used interchangeably ?

preference should be in the following order:
aptitude -> apt-get -> dpkg

use apt-get for anything that aptitude doesn't handle, and use dpgk for
the rest that you can't do with the other two.

since etch (and in ubuntu a while longer) aptitude is the recommended
tool and not optional any more.

also, do not use aptitude install/remove and apt-get install/remove
interchangeably. aptitude records which packages have been installed as
a dependency for other packages, and will remove them if you remove the
other package. this is very useful if you eg do:
aptitude install kde
which will install 315 packages on my machine.
if i later decide to remove it, aptitude will remove all those 315 packages.
apt-get will not.

aptitude will may get confused when you use apt-get.

aptitude has a lot of other features that make it preferable.

(aptitude search, which complements apt-cache search is nice as it shows
installed state as well)

note that aptitude by default installs recommended packages as well,
apt-get does not do that, so you may want to change the default or use
the -R argument.
(aptitude install -R kde results in 2xp17 packages)

i have not found anything that apt-get does that aptitude could not do,
and i almost never use dpkg except for dpkg -L if i can't figure out how
to use a package, or to resolve wierd package conflicts.

greetings, martin.
-- 
cooperative communication with sTeam      -     caudium, pike, roxen and unix
offering: programming, training and administration   -  anywhere in the world
--
pike programmer   working in new zealand        open-steam.org|webhaven.co.nz
unix system-      bahai.or.at                        iaeste.(tuwien.ac|or).at
administrator     (caudium|gotpike).org                          is.schon.org
Martin Bähr       http://www.iaeste.or.at/~mbaehr/



More information about the AuckLUG mailing list