All posts

Duplicating app installs between systems

A simple way to duplicate apps installed on one Linux system onto another.

Recently I built a new PC which meant moving a bunch of system settings and duplicating installed apps over to that new system.

This was actually a lot less painful that it could have been, especially when it came to duplicating installed apps. So to save others the hassle of having to find multiple different SO threads or even reading manuals I've gone ahead and set out instructions below on what is needed (well what I used, I'm sure there is an even easier method).

Duplicating installed apps

  1. List all installed apps and output to file on old system

    sudo apt list --installed >> parent_installed_apps.txt
  2. List all installed apps and output to file on new system

    sudo apt list --installed >> child_installed_apps.txt
  3. Copy parent_installed_apps.txt to new system, same folder as previous file

  4. Compare and strip duplicates and put in new file

    grep -vf parent_installed_apps.txt child_installed_apps.txt > apt_diff.txt
  5. Strip versions and branch from apt list, everything after the first /

    awk -F'/' '{print $1}' apt_diff.txt >> app_diff.txt
  6. Install apps line by line

    cat apt_diff.txt | xargs sudo apt install -yes
  7. Reboot system

I hope this helps someone else.