<br /> The Debian Sandwich Part II – Debian Planet

Welcome to Debian Planet

News for Debian. Stuff that *really* matters

These are important Debian sites one should not be without!

  • Official Debian site
  • Package search
  • Mailing list archives
  • Bug reports
  • Debian on CD
  • Debian Weekly News — excellent news source!
  • Unofficial APT sources

  • Developers’ Corner
  • Community
    Need help? You’re not alone on this planet.

  • Planet Debian
  • debianHELP
    (User support site)

  • Debian International
  • DebianForum.de

  • DebianForum.dk

  • EsDebian

  • DebianWorld

  • Debian-Fr

  • MaximumDebian

  • DebianUsers

  • Debian-BR

  • DebianHOWTO

  • Russian Debian
  • Debian-JP
  • Debian Suisse
  • Contribute
    Got that latest or greatest scoop? Perhaps you have some important news for the Debian community? Submit a news item!

    Or perhaps you’ve written a rather ground breaking insight into some aspect of Debian and you feel compelled to share it with others? Knock up a longer editorial article and send it to the editors.

    General feedback should be sent to staff@debianplanet.org

    The place to get help on a Debian problem (after reading docs) or to just chat and chill is #debian on irc.oftc.net.

    Many of the Debian Planet staff live there so pop by and say hello.

    Debian Planet also has its own channel on the same network called #debianplanet.


    DP is sponsored by Xinit Systems.

    Domains paid for and hosted by uklinux.net.

    Buy your Debian merchandise at DebianShop.com.

    Support Debian through Bytemark Hosting. At least £7 will be given for each new account


    The Debian Sandwich Part II
    Submitted by robster on Monday, April 02, 2001 – 21:36
    Welcome to the second part of The Debian Sandwich, I received so much glory and praise from the first part so I decided I thought I ought to write a sequel.
    Before we delve into the mysteries of dpkg which this article is mostly concerned with let me lead you through the reasoning behind The Debian Sandwich. This metaphor relates to the fact that in the Debian package system there are three layers, your highest level (which is the top slice of bread) is your favourite apt front end dselect/gnome-apt/kapt ( does this exist or am I imaging it?), the next layer in the sandwich is apt itself, this is the filling (Bacon, Lettuce and Tomato for me 🙂 ), the front end programs control apt. You can of course run apt yourself and many people do (including me!), apt is itself a wrapper for the lowest layer, dpkg, which is the bottom layer in the sandwich . Dpkg is a complex beast of which we are only going to scratch the surface of, it is unlikely that you will need to use dpkg much, it is mainly used to build new packages and those from source through its variants dpkg-deb, dpkg-buildpackage, dpkg-source (there are lots, typing dpkg and then using the auto complete feature of your shell (if it has one) will reveal them).
    We will just cover the basic and most useful features, of dpkg. If you want more in depth knowledge the man page provides an excellent source of information. I strongly recommend that you use apt as a wrapper for dpkg wherever possible. The only times you will not be able to use apt is if you have a stand alone deb file that you wish to install or if you want to remove a specific package without affecting dependencies etc through the use of –force-thing.
    The basic options available for dpkg are:

    dpkg -i | –install filename(s) – this command simply installs the given package file. Note: it takes the FULL path to the file not just the package name. If the package is already installed it upgrades it to this version

    dpkg -r | –remove packagename(s) – this command removes a package leaving any configuration files. Note: it takes the package name NOT the path to the file.

    dpkg -P | –purge packagename(s) – this command does the same as above but removes the configuration files also

    dpkg -l | –list pattern – find packages matching pattern e.g. dpkg -l *gnome*
    dpkg -s | –status packagename(s) – check the status of specified packages, see the man page for a full list but these include, installed, half-configured etc.

    dpkg -C | –audit – this is a very useful it checks all the installed packages on your system to look for broken packages, useful one to run in a crontab perhaps

    dpkg -L | –listfiles packagename(s) – list files belonging to specified package(s)
    dpkg -S | –search pattern – list the package(s) owning files that match pattern
    Thats about all the important commands there is just one option I think is important to mention and that is –force-thing, this allows you to override certain aspects of the packaging system for the command you are executing, for a full list of possible options do –force-help, but the only one i’ve ever used is –force-depends which turns all dependency problems into warnings.

    I hope you enjoyed this sequel, if you have any comments why not make them below

    Control panel

    Comment viewing options:

    Select your prefered way to display the comments and click ‘Update settings’ to activate your changes.

    Subject: Re: The Debian Sandwich Part II
    Author: Terence
    Date: Tuesday, 2001/08/14 – 05:28
    I know a lot of people say dselect and apt are the nifty front-ends that everybody will warm up to, but I learned dpkg before I grasped apt-get (I still haven’t found a use for dselect – that ponderous scrolling list of packages). I think you have shown that dpkg isn’t all that hard. A newbie can quickly learn dpkg -i, dpkg -r, and dpkg -l.

    Apt-get however does have the advantage of handling huge sets of dependencies and it keeps the packages pretty orderly and clean. After figuring out apt-get, I haven’t gone back to dpkg.

    [ Please login, or register ]

    Subject: Re: The Debian Sandwich Part II
    Author: Anonymous
    Date: Thursday, 2001/04/19 – 05:48
    Hello, I’m new to Debian, so know rpm pretty well and am new to dpkg. I must say that although rpm options are a bit more verbose, they do follow a pretty regular pattern, so things like querying a package or the package that owns a file for anything just involves changing the last option .. I don’t know, maybe it will come in time with dpkg with a bit more familliarity. There do seem like much fewer options which leads to my question:

    Do you know what the dpkg equivalent is to -qip which displays the information page within an rpm package?

    Also, what does -C audit against? does dpkg keep md5’s for each file on the system or something like that?

    [ Please login, or register ]


    Subject: The Debian Sandwich Part II
    Author: mph
    Date: Tuesday, 2002/02/05 – 15:54
    Console-apt seems to be much better than dselect and make installing debian almost nice.
    I am not sure why it is totally ignored by all commentators.
    [ Please login, or register ]


    Subject: Re: The Debian Sandwich Part II
    Author: Anonymous
    Date: Saturday, 2001/05/12 – 20:07
    dpkg –print-avail

    Even better is apt-cache.

    apt-cache show

    And one thing you can’t do with rpm.

    apt-cache search

    [ Please login, or register ]

    Search articles

    ·News (282)
    ·Features (5)
    ·Site News (11)
    ·HOWTOs (50)
    ·Tips (11)
    ·Opinion (21)
    ·Q & A (21)
    ·Sponsorship (1)
    ·Press Releases

    Log in


    Remember me

    » Register
    » New password

    Debian Security Announcements
    DSA-527 pavuk
    DSA-526 webmin
    DSA-525 apache
    DSA-524 rlpr
    DSA-523 www-sql
    DSA-522 super
    DSA-521 sup
    DSA-520 krb5
    DSA-519 cvs
    DSA-518 kdelibs

    Planet Debian
    Sean Harshbarger: 15 Jul 2004
    Edd Dumbill: On the radar
    Gerfried Fuchs: Debian-Installer tried, Fillets NG, djb
    Mike Beattie: Making your Backup MX do recipient verification with Exim…
    Adam Kessel: PHP Perils
    Simon Law: OSM
    Marco d’Itri: Call for USB coldplugging testers
    Todd Troxell: >_<
    Steve McIntyre: JTE 1.6 released
    Debian Weekly News

    Latest poll: How often would you like to see a Debian release?
    3 months
    6 months
    9 months
    1 year
    1.5 years
    2 years
    3 years

    Total votes: 615
    8 comments · older polls

    home · archives · news feeds · about · polls · search · sections · user account

    Powered by the amazing Drupal

    Debian Planet is not officially related to the Debian Project.
    Debian and the Debian logo are trademarks of Software in the Public Interest, Inc.