Create A List Of Installed Packages And Install Them Later From The List In CentOS And Ubuntu

Create A List Of Installed Packages In CentOS and Ubuntu

5 Responses

  1. dipanjan mukherjee says:

    If the question is reinstall the system with previously loaded pkgs then same thing we can do by using Kickstart file.Even we can do more by using it including partition,PKG install and configuration etc.

  2. Joe K says:

    sudo apt install `cat pkglist.txt`
    is more simple than
    sudo apt-get install $(cat pkglist.txt | awk ‘{print $1}’)
    and it works on Ubuntu 18.04

  3. pooky2483 says:

    How do we create a list of PPA’s & other sw sources then?

  4. Bernard says:

    Unfortunately pkglist.txt will not contain the versions of the packages installed. This is important when attempting to “freeze” the state of the packages so that the exact same package versions can be installed later on.
    To store the version number for each package is a common feature in most software packages (node npm, Python pip, Ruby gems, Go vendor.json, etc). I’m surprised to see the same ‘dpkg –get-selections’ answer everywhere even though it doesn’t solve that issue.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.