arch, linux

Save and restore your Arch Linux packages

Lately, I have been reinstalling Arch from scratch on several machines. When doing so, it is very handy to replicate your packages and that is actually very easy to do with Arch Linux.

Create a package list

The following command creates a list with your packages, that you can curate and store under private versioning control.

And this will create a list with the packages that were installed external to the pacman database, either manually installed or from the AUR.

Also, I store my dot files and some of my etc files in a private git repo.

Install from the package list

In order to install from these lists you can do

and

Other maintenance tasks

This will remove all packages that are not in list. It can be handy to clean up the list and update your system to it.

This will remove packages that were installed as dependencies and are no longer needed.

Get a backup of modified configuration files ( taken from ms pacman )

Well, I know there’s hundreds of ways to do this kind of task but here’s my two cents!

Author: nachoparker

Humbly sharing things that I find useful
[ github dockerhub ]

3 Comments on “Save and restore your Arch Linux packages

Leave a Reply

Your email address will not be published. Required fields are marked *