[HOW TO] Easily reinstall programs when Reinstalling Zorin

Sometimes, bad things happen even to good people. Maybe it was a power outage or some spilled coffee... But whatever it was, you now must wipe and reinstall Zorin OS.
What makes this particularly daunting is all your software you have installed must now be reinstalled.
(EDIT: I am removing the script option as some report they work and some report they do not work. Y-PPA-Manager is a lot easier and works every time.)
You can use Y PPA Manager GUI tool to back up your current repositories.

Run sudo apt update to ensure all repos are good and in their place.

Use Y PPA Manager to make back ups and restore PPAs from back up. sudo add-apt-repository ppa:webupd8team/y-ppa-manager sudo apt update sudo apt install y-ppa-manager. Click the Advanced button, then the Backup repositories button. Move the saved file to new installation and (You'd have to install y ppa manager over there... lol) and you can use the Restore repositories backup button.

Now that your repos are set, you need a list of all installed software. Chances are, you only want the Manually installed software. While this list will include auto-installed stuff, it should mostly suffice:

apt-mark showmanual

You can use this command to produce a package-list file in your home folder that lists all packages installed on your computer

sudo dpkg -l | awk '/^ii/ { print $2 }' >package-list

Move that package-list to the new installation (On a new computer- through USB on the same computer; whatever it is you need).
Then run the following command in terminal opened in the same directory that contains the package-list file on hte new installation:

sudo xargs apt-get install -y < package-list

Save those scripts and the package-list on a USB or cloud drive. This is also handy for creating backups of your PPA's and installed software as a reference even if a full reinstallation is not needed. You can reference the script that lists the PPAs in order to replace one you lost.

Source:

15 Likes

@Aravisian this some commands here '/^ii/ { print $2 }' it comes from python or which language to more understable language linux c/c++?

AWK is a scripting language. It is not Python or C++ and in fact was the inspiration for developing PERL.

1 Like

Well I had a horrible start to 2023.... The reason why I got Linux as Windows refused to install onto my SSD or repair the OS that is on. Switched to Linux and Bobs your uncle. But for me... 1Jan-2023 power tripped and boom my dual xeon blew 4 sas drives... I can live with that. Ryzen motherboard faulty, Parked for upgrades. Ok I have an I7 left and boom motherboard blew 2 caps....

Everything comes to an end eventually. With Windows, I use to reinstall every 6 months. So far I did not need to reinstall Linux till I upgrade my current platform.
Linux starts fine on 8gb ram. I have 16 but my one ram slot is faulty ( Like I said welcome to 2023 ) :smiley:

1 Like