Uusi asennus ja vanhassa systeemissä olevien ohjelmien asennus uuteen järjestelmään.

Suorita seuraava komento, joka listaa asennetut ohjelmat.

dpkg --get-selections > installed.txt && cat installed.txt | sed -r -i 's/\b(install|deinstall)\b//g' installed.txt

Päivitä uusi järjestelmä ensin ja sitten kokeile, että löytyykö samat ohjelmat myös uuteen järjestelmään. Päätteen kautta komento

sudo apt update && sudo apt install $(cat ~/installed.txt)

Todennäköisesti listasta täytyy poistaa joitain paketteja (käsin asennettuja), jotta ohjelmat asentuvat, joten poista ne paketit listasta (installed.txt) ja suorita sitten komento

sudo apt install $(cat ~/installed.txt)

Muut paketit kuten esimerkiksi varmennekortinlukijan ohjelmat ja jotkin selaimet (google-chrome, opera, etc..) täytyy asentaa ohjelman tekijän ohjelmistopaketista.


Run the following command to list the installed programs.

dpkg --get-selections > installed.txt && cat installed.txt | sed -r -i 's/\b(install|deinstall)\b//g' installed.txt

Update the new system first and then try to see if the same programs are also available on the new system. From the terminal, run the command

sudo apt update && sudo apt install $(cat ~/installed.txt)

You will probably need to remove some packages (manually installed) from the list in order for the programs to be installed, so remove those packages from the list (installed.txt) and then run the command

sudo apt install $(cat ~/installed.txt)

Other packages, such as the certificate card reader programs and some browsers (google-chrome, opera, etc..) must be installed from the software package of the program author.

##################################

Muokkaus 4.2.2025: Jos tätä ohjetta käyttää Linux Mintissä, niin seurauksena on seuraava virheilmoitus:

sudo apt install $(cat ~/installed.txt)
E: Command line option ’i’ [from -info] is not understood in combination with the other options.

En tiedä, että onko syy systemd järjestelmässä, joka ”tukehtuu” pakettien suuresta määrästä. Ratkaisuna tähän ongelmaan on pakettien asentaminen pienemmissä erissä, eli luetteloa täytyy muokata käsin. Paketit voi asettaa erilliseen tiedostoon ”yhdelle riville” komennolla

while read i; do printf '%s ' "$i"; done < installed.txt > installed-oneline.txt

Tätä tiedostoa voi sitten mukata ja paketit asentaa komennolla

sudo apt install $(cat ~/installed-oneline.txt)

Edit 4.2.2025: If you use this instruction in Linux Mint, the following error message will be displayed:

sudo apt install $(cat ~/installed.txt)
E: Command line option ’i’ [from -info] is not understood in combination with the other options.

I don’t know if the reason is in the systemd system, which is “choked” by the large number of packages. The solution to this problem is to install packages in smaller batches, i.e. the list must be edited manually. You can put the packages in a separate file “on one line” with the command

while read i; do printf '%s ' "$i"; done < installed.txt > installed-oneline.txt

You can then edit this file and install the packages with the command

sudo apt install $(cat ~/installed-oneline.txt)