Yesterday I installed 20.04.1 Focal to a new partition on my boot drive.
After the install I ran...
sudo apt update
sudo apt upgrade
...to get the system up to date.
Then I added packages to my preference. One at a time from listed notes recorded from a recent good 18.04.5 Bionic installation.
I tested Holger's commands on the new Focal install.
Originally Posted by
Holger_Gehrke
Code:
apt-mark showmanual
This produced an output with 68 lines. It's easy for me to see the things I've added there.
I checked /var/log/installer.
Code:
zen@gnuzen:~$ cd /var/log/installer
zen@gnuzen:/var/log/installer$ ls
casper.log initial-status.gz partman telemetry
debug media-info syslog version
Log file is still there.
I tried your suggested command:
Code:
(apt-mark showmanual;sudo zcat /var/log/installer/initial-status.gz | sed -n '/^Package: / s/^Package: //p')|sort|uniq -u > ~/packages.list
Its output file packages.list had 1552 lines. It contained many items that I had not added. But who knows what was updated right after the vanilla install. That update downloaded about 150MB.
To test your suggested install command 'xargs -a packages.list sudo apt install' I would need to create a new install of Focal. Not impossible, but I don't want to do it right at the moment.
Originally Posted by
oldfred
If upgrading, you may want to edit it to remove obsolete, old kernels or others. It will not re-install anything already installed.
https://help.ubuntu.com/community/Re...ngSamePackages
from lovinglinux - use dpkg to list installed apps
http://ubuntuforums.org/showpost.php...75&postcount=5
From old install
dpkg --get-selections > ~/my-packages
From New install
sudo dpkg --set-selections < my-packages
sudo apt-get -y update
sudo apt-get dselect-upgrade
#IF you get this error:
dpkg: warning: package not in database
sudo apt-get install dselect
sudo dselect
-> Update
-> Install
As a test I ran...
Code:
zen@gnuzen:~$ dpkg --get-selections > /media/zen/DG-1gb/dpkg-selections-dg
...which saved output to a USB stick. Output has 1882 lines, so ~300 more than Holger's command output.
This looks like a reliable method. I will certainly try it out.
Thanks for posting it, oldfred. If the process works cleanly it will save lots of time.
Thank you all for your responses.
Although I'm yet to test your suggestions my query has been comprehensively addressed.
Hence marked solved.
Cheers,
nought2
Bookmarks