repo-remove
Remove software repositories from the system
TLDR
Remove a package from a local repository
SYNOPSIS
repo-remove [OPTIONS]
PARAMETERS
--rpm
Specifies an RPM file by its name to be removed from the repository's metadata. The file must exist in the repository path.
--path
Specifies a relative path to an RPM file within the repository directory to be removed from the metadata.
--old-packages
Removes entries for RPMs that no longer exist on the filesystem within the specified repository path. This cleans up stale metadata.
-d, --database
Specifies an alternate database path for the repository metadata (e.g., when using createrepo_c).
--skip-symlinks
Instructs the command to skip processing symbolic links when scanning for RPMs or paths.
--temp-path
Specifies a temporary directory to be used for internal operations during metadata regeneration.
--workers
Sets the number of parallel workers to use for processing, speeding up operations on large repositories.
--checksum
Specifies the checksum algorithm to use for metadata entries (e.g., sha256, sha512).
--quiet
Suppresses most output from the command, showing only critical errors.
DESCRIPTION
The repo-remove command, often part of broader repository management tools like createrepo_c (where its functionality is typically accessed via subcommands like modify), is used to remove package entries from a local RPM repository's metadata. This process does not delete the actual package files from the filesystem but updates the repodata to reflect that certain packages are no longer available in the repository. This is crucial for maintaining accurate package lists, especially after removing old or deprecated RPM files. Without updating the repodata, package managers like DNF or YUM might still list packages that no longer exist, potentially leading to installation or update errors.
CAVEATS
The command repo-remove is not a standalone, universally available utility in most standard Linux distributions like Ubuntu or Fedora. Its functionality is typically provided by subcommands or options within broader repository management tools, such as the createrepo_c modify subcommand. Directly invoking repo-remove might only work if it's a custom script, an alias, or part of a less common utility set. The primary method to achieve this is usually by regenerating the repository metadata or using specific modify operations offered by tools like createrepo_c. Removing entries from the repository metadata does not delete the actual RPM files from the filesystem; it only updates the repository's index.
IMPACT ON REPOSITORY INTEGRITY
Removing packages from repository metadata using repo-remove (or its equivalent functionality) without deleting the corresponding RPM files can lead to inconsistencies if not managed properly. While package managers will no longer see the removed packages as available, the actual files will still consume disk space. Conversely, deleting RPM files from the repository directory without updating the metadata can lead to errors when a package manager attempts to retrieve a non-existent file, indicating a broken repository.
INCREMENTAL VS. FULL REBUILDS
Tools that provide repo-remove functionality, like createrepo_c, often offer both incremental updates and full rebuilds of repository metadata. Incremental updates are faster for minor changes like removing a few packages. However, for significant changes, to resolve complex inconsistencies, or to ensure complete accuracy, a full rebuild of the repository metadata might sometimes be preferred. A full rebuild effectively achieves a 'remove' by simply not including the unwanted packages in the newly generated metadata, ensuring a clean slate.
HISTORY
The concept of managing RPM repository metadata has evolved significantly with tools like createrepo and its modern successor createrepo_c. While a direct, standalone repo-remove command might not have been a consistent or widely adopted utility across all Linux distributions, the functionality to remove packages from a repository's index has always been essential for maintaining clean and accurate software repositories. Early methods often involved manually recreating repository metadata or using bespoke scripts to filter out unwanted RPMs. Modern tools like createrepo_c now provide more robust and efficient ways to incrementally modify existing repositories, including the removal of specific package entries or the cleanup of stale entries, often through dedicated modify subcommands, streamlining what might conceptually be called 'repo-remove' operations.