Skip to content

Instantly share code, notes, and snippets.

@taoy
Last active January 27, 2020 01:55
Show Gist options
  • Save taoy/ef9befae91fc86a2cb825c935a60d5d9 to your computer and use it in GitHub Desktop.
Save taoy/ef9befae91fc86a2cb825c935a60d5d9 to your computer and use it in GitHub Desktop.
Install packages on an old environment to the new environment on Debian GNU/Linux

Install Packages in an old environment to the New Environment on Debian GNU/Linux

Reffered URL

  1. At the Old environment, do this: $ sudo dpkg --get-selections "*" > packages.txt
  2. After copy that packages.txt to the New environment, do these following.
    1. $ apt-cache dumpavail > tmpdump
    2. $ sudo dpkg --merge-avail tmpdump
    3. $ sudo dpkg --set-selections < packages.txt
    4. $ sudo apt dselect-upgrade
    5. $ rm tmpdump

That's all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment