0

I am moving from a 2TB hard drive to a 4TB SSD. I have installed 22.04LTS on the new SSD. The complete list of non-SNAP packages I have is in /var/lib/dpkg/status . How do I force apt to install just the packages from the old /var/lib/dpkg/status file that have not been installed with the new 22.04LTS ? I have saved the old /var/lib/dpkg/status on the new drive in a non-systems directory owned by me. Obviously, I can do this manually one by one. If I do a diff between the old and new /var/lib/dpkg/status files, I presumably can find the files missing from the new /var/lib/dpkg/status. Is there a way to automate the process (e.g., switches to apt or any other package installer to only add the packages that are not on the new system)?

  • Yes you do them one at a time there are too many dependencies to do it any other way. – David Sep 18 '22 at 17:15
  • If you can boot old install, it is easy to export list of apps. And that should be part of a normal backup. Even if you have full list, it only installs those missing. Or you can export list of manually added. apt-mark showmanual | sort -u https://askubuntu.com/questions/17823/how-to-list-all-installed-packages & https://ubuntuforums.org/showthread.php?t=2474107&p=14091927#post14091927 – oldfred Sep 18 '22 at 17:23
  • Another option is to use https://unix.stackexchange.com/a/80520 on the older system, which provides you the list of packages present that were NOT installed by the Ubuntu installer (i.e. installed by you later). – user535733 Sep 18 '22 at 17:31
  • I am running the 2TB 22.04LTS now, with the 4TB 22.04 LTS SSD physically attached to a SATA to USB converter, accessed through a USB mount, and doing as root in a terminal under MATE cp -pra of various non-systems directories, such as /opt or /usr/local to the 4TB 22.04 LTS SSD. What are the specific steps to do what you suggest, to wit: it is easy to export list of apps. And that should be part of a normal backup. Even if you have full list, it only installs those missing. ? I assume that this is done in a terminal application as root . – Yasha Karant Sep 18 '22 at 17:36

0 Answers0