What is the difference between dpkg and aptitude/apt-get?
When installing a software via 'dpkg -i packageA.deb', will the dependencies required by packageA be downloaded and installed automatically (aka aptitude/apt-get ) or are all the required dependencies already built into packageA.deb package?
Thanks ! |
dpkg will not install the dependencies. You have to do it manually... apt-get will do both for you (download and install dependencies).
|
dpkg handles the basic low-level install/uninstall and configuration routines. Apt sits on top of it to add downloading, dependency handling, and other usability features. Aptitude, Dselect, Synaptic and such are all gui or ncurses frontends for Apt.
|
Now the difference between Aptitude and Dselect might be more relevant. At least I would be interested in knowing...
|
Quote:
|
David the H. wrote:
> dpkg handles the basic low-level install/uninstall and configuration routines. Apt sits on top of it I'm not so sure about that... It looks as if both apt and dpkg are considered "low-level" commands, somewhat separated from each other (except that they both use the same underlying deb packaging db/system). dselect {shudder :) } is the front-end for dpkg. aptitude and syntaptic are front-ends for the apt tools. You just don't think of apt-get as a low-level command because most folks use it all the time as the usual way to manage packages. |
I think David the H is a little closer to the truth there. dpkg does the actual installations, apt sits on top of that, and handles dependencies. At the very top is aptitude, well worth studying. aptitude is to apt as deselect to dpkg, but that's a vast understatement. It is a substitute for, and an improvement upon apt, and will eventually probably be the foundation for apt's replacement.
As johnMG said, dselect=shudder ... aptitude=smile ... /usr/share/doc/aptitude/README.gz |
I always use "aptitude install xxx". Why? Well aptitude remembers the dependencies installed with the package xxx and when you remove the package eg "aptitude remove xxx" or "aptitude purge xxx" then all the packages that were installed with the xxx (dependencies) will be removed too. Apt-get does not remember those packages, meaning you get a lot of useless packages on the system. Dpkg part you already know.
|
divukman, if using apt-get, you can then use deborphan and debfoster to keep your system clean of un-used packages. Didn't know aptitude had that functionality built-in though.
|
Quote:
no I've never heared of deborphan, so I just settled with aptitude :) |
Quote:
So, if one were to use Aptitude to uninstall something that was installed with apt, would that still remove dependencies? |
Quote:
|
Quote:
Accroding to Debian Docs at http://www.nl.debian.org/doc/manuals...ackage.en.html Code:
APT uses /var/lib/apt/lists/* for tracking available packages while dpkg uses /var/lib/dpkg/available. If you have installed packages using aptitude or other APT front ends and you want to use dselect to install packages then the first thing you should do is update /var/lib/dpkg/available by selecting [U]pdate from dselect's menu (or by running "dselect update"). So when I install any package from apt-get for e.g. apt-get install xserver-xorg I am able to do the following also: dpkg --purge xserver-xorg or dpkg-reconfigure xserver-xorg How does dpkg become aware of what packages were installed on my system with apt-get if both (APT & DPKG) uses different file for tracking packages. Next question is: We know that apt-get, aptitude, synaptic,gsynaptic are all tools related to APT system, but no where it is mentioned(in manuals) that dselect is a part of dpkg or APT, although when I read the man pages for dpkg and dselect, both of them said that is a front-end tool for dpkg and APT system respectively. So where does deselect stand ?? Also is there any way through apt-get by which we can download the recommended and suggested packages also. Does aptitude downloads recommended and suggested. Thanks |
Yes, all this is very confusing. I suggest sticking to one method for those in doubt, since dselect and apt-get/aptitude seem to use different underlying methods...
|
All times are GMT -5. The time now is 06:29 PM. |