LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 03-11-2006, 03:38 AM   #1
Akhran
Member
 
Registered: Aug 2005
Distribution: Debian 'lenny'
Posts: 208

Rep: Reputation: 30
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 !
 
Old 03-11-2006, 04:29 AM   #2
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,142
Blog Entries: 4

Rep: Reputation: 121Reputation: 121
dpkg will not install the dependencies. You have to do it manually... apt-get will do both for you (download and install dependencies).

Last edited by vharishankar; 03-11-2006 at 04:31 AM.
 
Old 03-11-2006, 06:54 AM   #3
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949Reputation: 1949
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.
 
Old 03-11-2006, 07:52 AM   #4
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,142
Blog Entries: 4

Rep: Reputation: 121Reputation: 121
Now the difference between Aptitude and Dselect might be more relevant. At least I would be interested in knowing...
 
Old 03-11-2006, 09:13 AM   #5
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 60
Quote:
Now the difference between Aptitude and Dselect...
The new book, The Debian System, goes into great and enlightening detail about that and other subjects ... I'm about half way thru it cover to cover. Will write a review when I'm at least 3/4 through. Great book, tho, for serious Debian users.
 
Old 03-11-2006, 01:54 PM   #6
johnMG
Member
 
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Rep: Reputation: 31
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.
 
Old 03-11-2006, 02:10 PM   #7
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 60
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

Last edited by rickh; 03-11-2006 at 02:20 PM.
 
Old 03-11-2006, 05:25 PM   #8
divukman
Member
 
Registered: Sep 2005
Location: Split, Croatia
Distribution: Gentoo/Debian
Posts: 140
Blog Entries: 8

Rep: Reputation: 15
Lightbulb

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.
 
Old 03-13-2006, 09:30 AM   #9
johnMG
Member
 
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Rep: Reputation: 31
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.
 
Old 03-13-2006, 10:56 AM   #10
divukman
Member
 
Registered: Sep 2005
Location: Split, Croatia
Distribution: Gentoo/Debian
Posts: 140
Blog Entries: 8

Rep: Reputation: 15
Quote:
Originally Posted by johnMG
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.
tnx,
no I've never heared of deborphan, so I just settled with aptitude
 
Old 03-13-2006, 04:12 PM   #11
RodWC
Member
 
Registered: Oct 2005
Distribution: Debian Etch i386, Lenny and Sid amd64
Posts: 177

Rep: Reputation: 30
Quote:
Originally Posted by divukman
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.

So, if one were to use Aptitude to uninstall something that was installed with apt, would that still remove dependencies?
 
Old 03-13-2006, 05:10 PM   #12
divukman
Member
 
Registered: Sep 2005
Location: Split, Croatia
Distribution: Gentoo/Debian
Posts: 140
Blog Entries: 8

Rep: Reputation: 15
Lightbulb

Quote:
Originally Posted by RodWC
So, if one were to use Aptitude to uninstall something that was installed with apt, would that still remove dependencies?
No, try deborphan for that.
 
Old 03-13-2006, 08:18 PM   #13
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 48
Quote:
Originally Posted by David the H.
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.
I guess I have something more to add to the ongoing confusion.

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
 
Old 03-13-2006, 11:33 PM   #14
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,142
Blog Entries: 4

Rep: Reputation: 121Reputation: 121
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...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
APT/dpkg errors! /var/lib/dpkg/status bassclarinet Debian 16 12-01-2011 09:24 AM
apt-get vs. aptitude freddie_leaf Debian 28 01-13-2011 06:56 AM
Aptitude *better alternative* to Apt-Get? Triple5 Debian 6 12-05-2004 02:24 PM
difference bet dpkg -r and apt-get remove? pablowablo Linux - Newbie 2 08-06-2004 03:45 PM
Debian aptitude - apt-get problem mikek147 Linux - Distributions 1 09-15-2002 07:11 AM


All times are GMT -5. The time now is 10:15 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration