rpmconf
Manage RPM package configuration file changes
TLDR
List leftover files and interactively choose what to do with each of them
Delete orphaned RPMNEW and RPMSAVE files
SYNOPSIS
rpmconf [OPTIONS] [PACKAGE...]
PARAMETERS
-a, --all
Process all unresolved .rpmnew and .rpmsave files found on the system.
-o, --output-diff
Show the diff in the output rather than interactively prompting for action. Often used with -a for non-interactive analysis.
-r, --rpm-file file
Process configuration files related to the specified RPM package file (e.g., /path/to/mypackage.rpm).
-P, --package pkg
Process configuration files for the specified installed pkg (name or glob pattern, e.g., httpd).
-f, --file file
Process the specified configuration file, typically one ending in .rpmnew or .rpmsave.
--diff-program prog
Specify an alternative program to use for showing differences (default is diff or from RPMDIFFPROG env var).
--editor prog
Specify an alternative editor to use for merging files (default is vi or from EDITOR env var).
--text-mode
Use text mode for interaction, which can be useful in non-graphical environments or for basic scripting.
-v, --verbose
Increase verbosity of output.
-h, --help
Display a help message and exit.
-V, --version
Display version information and exit.
DESCRIPTION
rpmconf is a command-line utility used primarily by system administrators to manage and resolve conflicts in configuration files during or after an RPM package upgrade. When an RPM package is upgraded, and a configuration file included in the package has been locally modified, RPM might install the new version with an extension (e.g., .rpmnew) or move the old version to .rpmsave.
rpmconf automates the process of finding these conflict files (e.g., .rpmnew, .rpmsave) and interactively prompts the user to decide which version to keep, view the differences, or edit/merge the files. It simplifies the post-upgrade cleanup of configuration files, ensuring system stability while preserving local customizations.
CAVEATS
rpmconf is primarily an interactive tool, requiring user input for each conflict resolution. While some options provide non-interactive output, its core design focuses on guided conflict management. It generally requires root privileges to modify system configuration files and addresses conflicts after the RPM transaction has completed, not during the package installation or upgrade itself.
INTERACTIVE PROMPTS
When rpmconf encounters a conflict, it presents a series of interactive choices to the user. The most common options are:
k (keep): Keep the existing, locally modified file and ignore the new package version.
n (new): Install the new file from the package, overwriting the locally modified version.
d (diff): Show the differences between the two files (local and new).
m (merge): Merge the files using the configured editor (e.g., vi), allowing manual resolution.
s (skip): Skip this file and leave it unresolved for now, proceeding to the next conflict.
x (exit): Exit rpmconf immediately.
? (help): Show help for the prompt options.
CONFLICT FILE EXTENSIONS
rpmconf specifically targets configuration files marked by RPM during package upgrades. These typically have the following extensions:
.rpmnew: This file indicates the new version of a configuration file from the package. It is created when RPM detects that the original file was locally modified, and thus installs the new version alongside the old.
.rpmsave: This file indicates the old, locally modified version of a configuration file. It is created by RPM when the new package version overwrites the original file, saving the user's modifications.
HISTORY
rpmconf is part of the rpm-utils package, which is commonly distributed with Red Hat-based Linux distributions (e.g., RHEL, Fedora, CentOS). Its development is intrinsically linked to the RPM package management system, having emerged as a dedicated utility to streamline the common administrative challenge of managing configuration file changes and conflicts during package upgrades. It automates a task that was previously manual and error-prone, thereby enhancing system stability and maintainability.