[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:

8 Likes