Page 1 of 1

Make Reinstalling Linux Faster With A Package List

Posted: Fri Feb 14, 2020 6:37 pm
by KoO
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

Re: Make Reinstalling Linux Faster With A Package List

Posted: Fri Feb 14, 2020 6:50 pm
by manyroads
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.... ;)

Re: Make Reinstalling Linux Faster With A Package List

Posted: Fri Feb 14, 2020 7:00 pm
by Stevo
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

Posted: Fri Feb 14, 2020 8:12 pm
by KoO
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 :p

@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
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

Re: Make Reinstalling Linux Faster With A Package List

Posted: Fri Feb 14, 2020 8:49 pm
by imschmeg
Note this thread:
viewtopic.php?f=23&t=54914

Re: Make Reinstalling Linux Faster With A Package List

Posted: Fri Feb 14, 2020 10:07 pm
by KoO
imschmeg wrote: Fri Feb 14, 2020 8:49 pm Note this thread:
viewtopic.php?f=23&t=54914
Thanks for the link.

Re: Make Reinstalling Linux Faster With A Package List

Posted: Sat Feb 15, 2020 6:57 pm
by sunrat
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:
Restore installed software

On the old system, backup installed packages information:

Code: Select all

dpkg --get-selections >/backup/package-selections
Transfer the file backup/package-selections on the new system and run:

Code: Select all

apt install $(cat /backup/package-selections | awk '{print $1}')

Re: Make Reinstalling Linux Faster With A Package List

Posted: Sat Feb 15, 2020 7:26 pm
by imschmeg
@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:

Code: Select all

libreoffice-base				deinstall
because I removed libreoffice.

Re: Make Reinstalling Linux Faster With A Package List

Posted: Sat Feb 15, 2020 8:06 pm
by sunrat
Hmmm, ok, so the wiki is wrong (again). The old way to do it was:
To backup:
dpkg --get-selections > /tmp/dpkglist.txt

To Restore:
dpkg --set-selections < /tmp/dpkglist.txt
apt-get update
apt-get dselect-upgrade
which will actually remove any packages from the new system which don't exist on the old system.
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...

Re: Make Reinstalling Linux Faster With A Package List

Posted: Sat Feb 15, 2020 8:24 pm
by sunrat
Try this to get the package list:

Code: Select all

dpkg --get-selections |awk '!/deinstall/' >package-selections 
Then same as above to install:

Code: Select all

apt install $(cat package-selections | awk '{print $1}')
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.