Debian Planet

Welcome to Debian Planet


All your woody are (not quite, but very very very soon) belong to us.
Main Menu

  • Home

  • Topics

  • Web Links

  • Your Account

  • Submit News

  • Stats

  • Top 10

  • Debian

    These are important Debian sites one should not be without!

  • Official Debian site

  • Package search

  • Mailing list archives

  • Bug reports

  • Debian on CD

  • Unofficial woody CD ISOs

  • Unofficial APT sources

  • Developers' Corner

    Other great Debian news sources:

  • Debian Weekly News

  • Kernel Cousin Debian

    (Debian mailing lists digested)
  • Community Groups

    Need help? You're not alone on this planet.

  • debianHELP

    (User support site)

  • Debian International



  • EsDebian


  • DebianWorld


  • MaximumDebian


  • DebianUsers


  • Debian-BR


  • IRC

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

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

    Wanna write?

    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.


    DP is sponsored by Xinit Systems and

    Domains paid for and hosted by

    Buy your Debian merchandise at

    Who's Online

    There are currently, 106 guest(s) and 6 member(s) that are online.

    You are Anonymous user. You can register for free by clicking here.

    Tips 'n' Tricks: Saving package list for later
    Contributed by ariejan on Saturday, April 06 @ 09:56:18 BST

    Ask Debianplanet
    Is there a good way to save the packages installed? So if I install Debian, again, I can just point
    dselect to the list and all the software I had installed, is installed again?

    Rob: dpkg --get-selections > foo and dpkg --set-selections < foo

    Related Links

  • More about Ask Debianplanet
  • News by rob

    Most read story about Ask Debianplanet:
    XFree86 4.2.0

    Last news about Ask Debianplanet:

    Printer Friendly Page  Send this Story to a Friend
  • "Tips 'n' Tricks: Saving package list for later" | Login/Create Account | 13 comments

    The comments are owned by the poster. We aren't responsible for their content.

    Re: Saving package list for later (Score: 1)
    by rob on Saturday, April 06 @ 09:59:02 BST
    (User Info)

    Note, this is under the Tips & Tricks category, in future i will not be publishing such articles into the frontpage so i recommend you check out these categories at regular intervals. The numbers in backets next to the category names show the last new entry date in US style, i may change this to GB.

    [ Reply ]

    Re: Saving package list for later (Score: 0)
    by Anonymous on Saturday, April 06 @ 11:16:00 BST

    It's a different way of doing it, but you can make
    meta-packages that pull in software.

    Basically you create a file custom-foo/DEBIAN/control
    and put the packages you want on the Depends
    line (don't worry about dependencies)

    Package: custom-foo
    Version: 1-1
    Architecture: all
    Depends: mutt, vim, tin
    Maintainer: Joe User
    Description: Joe User metapackage

    then use dpkg to build a deb.

    This is useful if you maintain a machine with different users. You can use it to track who requested what software, while using deborphan to clear out the cruft, without having to double-guess if you have emacs users on the system.

    [ Reply ]

    Re: Saving package list for later (Score: 1)
    by zadok on Saturday, April 06 @ 11:16:22 BST
    (User Info)

    To stop this type of post again on dp, which I think is the wrong palce for it, shouldn't there be a link to on the submit news page, to inform people of the right site to post such a query.


    [ Reply ]

    Re: Saving package list for later (Score: 1)
    by undefined (unlisted(at)pobox(dot)com) on Saturday, April 06 @ 20:51:22 BST
    (User Info)

    to add to what rob said...

    i would also recommend archiving the output of "COLUMNS=150 dpkg -l" because get-selections only tells you what the desired state of a package is, not it's current version. for example, if a package is on hold, get-selections will tell you that it is on hold, but not what version it is currently (which is the version you will probably want/need to reinstall). the COLUMNS bash variable (other shells?) tells dpkg to print its output using 150 char width. otherwise some of your name and version strings may be cut short.

    i have had gpm on hold because recent version would not function correctly with my ibm thinkpad's trackpoint. so, i've recorded (with the above command) what version of gpm i use so that if i should have to reinstall debian, i'll know what specific version to use.

    granted, your question asks for an automatic method (create list, point some app at list to reinstall everything), and this must be done manually (except using a script to parse this list looking for held packages and executing apt-get or dpkg with the package name and version), but it's necessary to get the complete picture.

    btw, i think i remember seeing an app in the debian archives that would do what a pervious poster suggested: it would create metapackages (of installed apps) to help facilitate installing groups of packages by having all those packages as "depends". can't remember the name and could find it just now searching

    [ Reply ]

    • jablicator by Anonymous on Monday, April 08 @ 21:57:06 BST

    Re: Saving package list for later (Score: 2, Insighful)
    by GehRehmee on Sunday, April 07 @ 02:29:41 BST
    (User Info)

    That's all fine and good... but what I'd really like to do, and what would save me just as much time with my systems, would be to save debian configuration. Is it sufficient to simply copy /var/cache/debconf? Is it even safe?

    [ Reply ]

    Re: Saving package list for later (Score: 0)
    by Anonymous on Monday, April 08 @ 21:53:04 BST

    apt-get install jablicator

    [ Reply ]

    Re: Saving package list for later (Score: 0)
    by Anonymous on Thursday, April 25 @ 21:17:06 BST

    dpkg --get-selections '*' > install_state

    dpkg --set-selections < install_state Without the '*' get-selections will only tell you what is currently installed. By adding the '*' the set-selections will mark things to be uninstalled if they were not installed when get-selections was run. The downside is any new packages that didn't exist when get was run, will be left however they were before set is run. -Mike

    [ Reply ]

    Based on: PHP-Nuke

    All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 2000 by Debian Planet

    You can syndicate our news using the file backend.php.