Find the answer to your Linux question:
Results 1 to 7 of 7
Hey there, i have a server that took me a long time to set up soon we will be upgrading the hardware with a new computer. is there a list ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2005
    Posts
    15

    need a list of installed packages


    Hey there,
    i have a server that took me a long time to set up
    soon we will be upgrading the hardware with a new computer.
    is there a list of apt-installed packages anywhere i can print out or copy to a disk so i will know what all i will need to set the new box up just like this one?
    thanks

  2. #2
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    Location
    Texas
    Posts
    9,496
    I think perhaps
    Code:
    apt-show-versions
    will do the trick.
    Registered Linux user #270181
    TechieMoe's Tech Rants

  3. #3
    Linux Newbie
    Join Date
    Jul 2005
    Location
    ~/home
    Posts
    105
    Code:
    dpkg -l
    provides you with the full list of installed packages,
    if you only want to know the names and put them in a txt file
    Code:
    dpkg- l | awk '{print $2}' > installed_packages.txt
    if you install a new box, just install the base system without any packages (don't use tasksel and / or deslect) and run
    Code:
    apt-get install `cat installed_packages.txt`
    Help me getting a Opera licence
    Beginning with debian? -> read THIS!

  4. #4
    Linux Newbie
    Join Date
    Jul 2005
    Location
    Turn Around
    Posts
    202
    use this

    aptitude
    then select "installed packages"

    (note: white packages marked with an "i" are installed, while grey packages marked with a "p" are not installed.)

  5. #5
    Just Joined!
    Join Date
    Aug 2005
    Posts
    15
    Quote Originally Posted by alain_
    Code:
    dpkg -l
    provides you with the full list of installed packages,
    if you only want to know the names and put them in a txt file
    Code:
    dpkg- l | awk '{print $2}' > installed_packages.txt
    if you install a new box, just install the base system without any packages (don't use tasksel and / or deslect) and run
    Code:
    apt-get install `cat installed_packages.txt`
    worked like a charm. this is going to save me a ton of time when we do this.
    thanks much

  6. #6
    Just Joined!
    Join Date
    Jun 2006
    Posts
    3
    Thanks! I've been thinking about how I might do this for the past few days. This worked great.

  7. #7
    Just Joined!
    Join Date
    Jun 2010
    Posts
    8
    There is a problem with this method, which is the loss of information of the packages that the user wants to have installed.

    For instance a package Av1 may require of package B, but when Av1 is upgraded to Av2 it may not require B any more, and B can be deleted, unless the user explicitly stated he wanted to install B, then it would be a little harsh to delete it, and debian keeps it. Then same happens when deleting packages voluntarily, the dependencies may be removed or not, depending if they are needed for some package that the user decided to have. AFAIK that's the way aptitude works.

    However, when installing all those packages explicitly they will not be removed by upgrades nor by uninstalling the packages that caused their installation as dependencies. Which is sad, IMHO.

    Is there any way to keep this information? ie: is there any way to list only the packages that were explicitly installed? (so those are the only ones installed again and the remainder come as dependencies) apt-get is great because of the way it handles dependencies, and as I said, its sad to turn the back to such a nice feature.

    Thank you.

    PD: sorry for resurrecting the thread, but since it has been here for 5 years and google really appreciates it I thought it would be good to have updated information. At least I would like to

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •