Make Reinstalling Linux Faster With A Package List
Make Reinstalling Linux Faster With A Package List
DT have put out a new video on reinstalling your installed programs after a new install.
For Arch & Debian
https://www.youtube.com/watch?v=HGobqJS5L2Y
For Arch & Debian
https://www.youtube.com/watch?v=HGobqJS5L2Y
Main : MX 19.1-AHS (i3) 5.4.13-1~mx19+1, Asus B450-i AMD 5 3600 , 32gb Hyper-X 3200 , GTX970 . 
Lenovo T430 : Debian10 antiX17 (i3) , 4.20.12 , i5 , 12gb .
Lenovo X220 : Test Machine (ATM)

Lenovo T430 : Debian10 antiX17 (i3) , 4.20.12 , i5 , 12gb .
Lenovo X220 : Test Machine (ATM)
Re: Make Reinstalling Linux Faster With A Package List
I have published and do the same thing. I find that building both my application adds and removals via scripts along with a small assist from Luckybackup allows me to change entire environments in about 4 hours (mostly in the form of data downloads); it is magnificent. It used to take me 4 days... (a slow learner am I). I have built 6 machines this week using the approach including shifts between MX & manjaro. Simply the only way to go.... 

Pax vobiscum,
Mark Rabideau - ManyRoads Genealogy -or- eirenicon llc. (geeky stuff)
i3wm, bspwm, hlwm, dwm, spectrwm ~ Linux #449130
"For every complex problem there is an answer that is clear, simple, and wrong." -- H. L. Mencken
Mark Rabideau - ManyRoads Genealogy -or- eirenicon llc. (geeky stuff)
i3wm, bspwm, hlwm, dwm, spectrwm ~ Linux #449130
"For every complex problem there is an answer that is clear, simple, and wrong." -- H. L. Mencken
Re: Make Reinstalling Linux Faster With A Package List
Maybe a native MX tool would help, since aptik is no longer freely developed. It could also save fonts and scripts in /usr, as well as your third-party repositories and present those for editing before restoring them.
Re: Make Reinstalling Linux Faster With A Package List
I can have a fresh install of MX-19 i3wm up and running in about two hours with all my programs installed including folders and tweaked. Had plenty of practice
@Stevo Thats sounds like and idea.
I keep all my files & folders in home
.bashrc .Xresources .dir_colors .config configs , .script , .fonts , .icons , .themes .calcurse , waterfox .waterfox , walls etc.
Only two or three for system
/etc asound.conf , hddtemp.db
/etc/X11/xorg.conf.d/ 20_nvidia.conf << only use this file to keep my nvidia advanced setting.
All my programs are installed in one go from my install help file. Some are not needed depends on the system.
Only do one git install i3-gaps which takes more time then the above. The build dependences and install.
git clone https://www.github.com/Airblader/i3 i3-gaps

@Stevo Thats sounds like and idea.
I keep all my files & folders in home
.bashrc .Xresources .dir_colors .config configs , .script , .fonts , .icons , .themes .calcurse , waterfox .waterfox , walls etc.
Only two or three for system
/etc asound.conf , hddtemp.db
/etc/X11/xorg.conf.d/ 20_nvidia.conf << only use this file to keep my nvidia advanced setting.
All my programs are installed in one go from my install help file. Some are not needed depends on the system.
Code: Select all
sudo apt-get install ranger caca-utils highlight atool w3m w3m-img mediainfo git picom rofi dunst cups curl wget hddtemp at-spi2-core imagemagick yad xdotool fbset gconf2 catfish xdo zenity xurls -y
git clone https://www.github.com/Airblader/i3 i3-gaps
Main : MX 19.1-AHS (i3) 5.4.13-1~mx19+1, Asus B450-i AMD 5 3600 , 32gb Hyper-X 3200 , GTX970 . 
Lenovo T430 : Debian10 antiX17 (i3) , 4.20.12 , i5 , 12gb .
Lenovo X220 : Test Machine (ATM)

Lenovo T430 : Debian10 antiX17 (i3) , 4.20.12 , i5 , 12gb .
Lenovo X220 : Test Machine (ATM)
Re: Make Reinstalling Linux Faster With A Package List
Thanks for the link.
Main : MX 19.1-AHS (i3) 5.4.13-1~mx19+1, Asus B450-i AMD 5 3600 , 32gb Hyper-X 3200 , GTX970 . 
Lenovo T430 : Debian10 antiX17 (i3) , 4.20.12 , i5 , 12gb .
Lenovo X220 : Test Machine (ATM)

Lenovo T430 : Debian10 antiX17 (i3) , 4.20.12 , i5 , 12gb .
Lenovo X220 : Test Machine (ATM)
Re: Make Reinstalling Linux Faster With A Package List
Useful for Arch but the bit on Debian-based systems is lacking. apt list --installed won't give a list you can feed back into a package installer without subsequent editing.
Debian wiki has an excellent guide on doing this - https://wiki.debian.org/AptCLI#Restore_ ... d_software
It's this simple:
Debian wiki has an excellent guide on doing this - https://wiki.debian.org/AptCLI#Restore_ ... d_software
It's this simple:
Restore installed software
On the old system, backup installed packages information:
Transfer the file backup/package-selections on the new system and run:Code: Select all
dpkg --get-selections >/backup/package-selections
Code: Select all
apt install $(cat /backup/package-selections | awk '{print $1}')
Re: Make Reinstalling Linux Faster With A Package List
@sunrat
You might want to filter dpkg --get-selections output a bit more than suggested by that link. Its output includes packages that were removed. For instance, my output has:
because I removed libreoffice.
You might want to filter dpkg --get-selections output a bit more than suggested by that link. Its output includes packages that were removed. For instance, my output has:
Code: Select all
libreoffice-base deinstall
Re: Make Reinstalling Linux Faster With A Package List
Hmmm, ok, so the wiki is wrong (again). The old way to do it was:
I'm just trying to work out how to do it using the basics of the wiki method, which should theoretically be better. My attempt so far has found a handful of installed packages which are no longer available, so it stalls at that point. Stand by...
which will actually remove any packages from the new system which don't exist on the old system.To backup:
dpkg --get-selections > /tmp/dpkglist.txt
To Restore:
dpkg --set-selections < /tmp/dpkglist.txt
apt-get update
apt-get dselect-upgrade
I'm just trying to work out how to do it using the basics of the wiki method, which should theoretically be better. My attempt so far has found a handful of installed packages which are no longer available, so it stalls at that point. Stand by...
Last edited by sunrat on Sat Feb 15, 2020 8:26 pm, edited 1 time in total.
Re: Make Reinstalling Linux Faster With A Package List
Try this to get the package list:
Then same as above to install:
I simulated install with this and it seems to work. Of course repos need to be the same and updated. Also assuming it's being run from same working directory containing package-selections file.
Code: Select all
dpkg --get-selections |awk '!/deinstall/' >package-selections
Code: Select all
apt install $(cat package-selections | awk '{print $1}')