Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save nuclearglow/fabd8d169682a21f059b86750bc6dd00 to your computer and use it in GitHub Desktop.

Select an option

Save nuclearglow/fabd8d169682a21f059b86750bc6dd00 to your computer and use it in GitHub Desktop.

Revisions

  1. nuclearglow created this gist Apr 7, 2021.
    15 changes: 15 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    # backup the sources.list file !
    # backup
    apt-mark showmanual > .installed_ubuntu_packages
    # on another system
    # restore sources.list file !
    xargs < .installed_ubuntu_packages apt-get install -y


    ä old school way
    # backup the sources.list file !
    dpkg --get-selections > .installed_ubuntu_packages
    # on a new system
    # restore sources.list file !
    dpkg --clear-selections
    sudo dpkg --set-selections < list.txt