Yeah and on Arch-based systems:
Backup Packages
Back up explicitly installed package list:
pacman -Qqe > ~/packages.txt
Back up explicitly installed foreign packages list (i.e. the AUR):
pacman -Qqm > ~/foreign_packages.txt
Backup the pacman config/mirrors:
cp /etc/pacman.conf ~/pacman.conf.backup
cp -r /etc/pacman.d/ ~/pacman.d.backup
Restore Packages
Restore the pacman config/mirrors:
sudo cp ~/pacman.conf.backup /etc/pacman.conf
sudo cp -r ~/pacman.d.backup/* /etc/pacman.d/
Sync the system and update packages:
sudo pacman -Syu
Reinstall packages:
sudo pacman -S --needed - < ~/packages.txt
Reinstall foreign packages:
yay -S --needed - < ~/foreign_packages.txt
Sure can! Paru is a drop-in replacement, so you can just replace
yay
withparu
and the rest of the command remains the same.