Skip to content

Instantly share code, notes, and snippets.

@MasterEx
Created August 11, 2011 11:05
Show Gist options
  • Save MasterEx/1139387 to your computer and use it in GitHub Desktop.
Save MasterEx/1139387 to your computer and use it in GitHub Desktop.
ArchLinux broken package entries

Somehow my /var was corrupted and I lost some files from /var/pacman/local/.

The files were many so I decided to download all the descriptions with the following script.

The -f argument does the following:

Bypass file conflict checks and overwrite conflicting files. If the package that is about to be installed contains files that are already installed, this option will cause all those files to be overwritten. This option should be used with care, ideally not at all.

Another approach could be to upgrade my system like pacman -Syuf. However, that way if a file with lost descriptions wasn't upgraded I should run this command again in the future.

#/usr/bin/env bash
for program in $( pacman -Q | cut -d ' ' -f1); do
pacman -Sf --noconfirm $program
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment