pacrepairdb
Repair pacman package database
TLDR
Perform a basic repair on a specific package
Update the database entries without extracting or removing any packages
Display the packages to be repaired and the cache packages to be used without making any changes
Display additional progress and debug information
Display help
Display version
SYNOPSIS
pacrepairdb [-q] [-r] [-f] [package ...]
PARAMETERS
-q, --quiet
Produce minimal output
-r, --rebuild-db
Rebuild package database after repairs
-f, --force
Force reinstall even if files seem correct
DESCRIPTION
pacrepairdb is a utility for Arch Linux that fixes discrepancies between the local Pacman package database and filesystem. It detects packages with missing files, incorrect checksums, ownership, or permissions using pacman -Dk, then reinstalls them to restore integrity.
By default, it checks all explicitly installed packages. Specify packages on the command line to limit scope. Ideal for recovering from manual file changes, disk issues, or interrupted updates.
Requires root privileges and may download packages unless cached locally. Outputs progress and issues found; use with caution on customized systems to avoid overwriting modifications.
CAVEATS
Requires root; downloads packages if not cached; may overwrite user modifications; test on specific packages first.
EXAMPLES
Repair all explicit packages:
sudo pacrepairdb
Specific packages:
sudo pacrepairdb firefox
Force and rebuild:
sudo pacrepairdb -rf
HISTORY
Added to pacman-contrib ~2018; maintains Pacman database hygiene as Arch evolves.
SEE ALSO
pacman(8), pacman-key(8), pacman-db-upgrade(8)


