Skip to content

Instantly share code, notes, and snippets.

@gld1982ltd
Created November 28, 2015 07:30
Show Gist options
  • Save gld1982ltd/daa7e94fde267fd11a05 to your computer and use it in GitHub Desktop.
Save gld1982ltd/daa7e94fde267fd11a05 to your computer and use it in GitHub Desktop.
fix-pacman-key
#!/bin/bash
#
# Run this script as root to fix errors related to pacman-key
rm -rf /etc/pacman.d/gnupg/
rm -rf /root/.gnupg/ # only if the directory exists
gpg --refresh-keys
pacman-key --init && pacman-key --populate
pacman-key --refresh-keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment