Last active
January 18, 2020 17:08
-
-
Save zachsmith/bd9ad78be09fbfd38d0c5bdc66cc7196 to your computer and use it in GitHub Desktop.
Backup list of packages installed on Arch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install the following files in ~/.config/systemd/user to backup a list of packages installed via pacman. | |
I copy to Nextcloud so I have a remove copy in case I need to reinstall. | |
--- | |
# backup-package-list.timer | |
[Unit] | |
Description=Create a list of installed packages | |
Documentation=Make a backup of packages installed with pacman right after login and then once per day | |
[Timer] | |
OnStartupSec=45 | |
OnUnitActiveSec=1d | |
[Install] | |
WantedBy=default.target | |
--- | |
# backup-package-list.service | |
[Unit] | |
Description=Backup list of packages installed by pacman | |
[Service] | |
Type=oneshot | |
StandardOutput=file:%h/Nextcloud/Backups/%H/packages.txt | |
ExecStart=pacman -Qqe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment