urpmi.removemedia
Remove package repositories configured for urpmi
TLDR
Remove a medium
Remove [a]ll media
Remove media fuzz[y] matching on media names
SYNOPSIS
urpmi.removemedia [OPTIONS] [media_name | --all | --unreachable]
PARAMETERS
media_name
Specifies the name of the particular media (repository) to be removed. This name typically corresponds to the name given when the media was added using urpmi.addmedia.
--all
Removes all currently configured package media from the system. Use this option with extreme caution, as it will disable all software sources for urpmi.
--unreachable
Removes only those media that urpmi determines are currently inaccessible. This is useful for automatically cleaning up broken or temporarily unavailable repository links.
-h, --help
Displays a brief help message and exits, showing the command's syntax and available options.
-v, --verbose
Increases the verbosity of the output, providing more details about the operation being performed.
-p, --just-print
Performs a dry run; it shows what actions would be taken without actually modifying the system's media configuration. Useful for testing before committing changes.
DESCRIPTION
urpmi.removemedia is a command-line utility used in urpmi-based Linux distributions (such as Mageia and older Mandriva) to remove package media (software repositories or sources) from the system's configuration. Media are locations from which urpmi fetches packages and their metadata. Removing a media source means urpmi will no longer consider that specific repository when resolving dependencies, installing new software, or checking for updates.
This command is useful for cleaning up unused, deprecated, or unreachable repositories, streamlining the package management process, and preventing urpmi from attempting to access sources that are no longer available. It can target specific media by name, remove all configured media, or intelligently remove only those media currently inaccessible.
CAVEATS
This command is specific to Linux distributions that utilize the urpmi package manager, primarily Mageia and older Mandriva/Mandrake Linux systems. It is not available on Debian/Ubuntu (which use APT) or Fedora/RHEL (which use DNF/RPM). Executing urpmi.removemedia typically requires root privileges (e.g., using sudo). Removing essential media can significantly impact the ability to install, update, or resolve dependencies for packages.
IMPACT ON PACKAGE MANAGEMENT
When a media source is removed, any packages exclusively provided by that source will no longer be discoverable or installable by urpmi. If packages previously installed from a removed source require updates or if their dependencies are needed, urpmi might prompt the user to re-add the missing media or look for alternative sources.
USAGE EXAMPLES
To remove a media named 'Core Updates':sudo urpmi.removemedia "Core Updates"
To remove all media that are currently unreachable:sudo urpmi.removemedia --unreachable
To see what would happen if all media were removed, without actually doing it:sudo urpmi.removemedia --all --just-print
HISTORY
The urpmi suite of tools, including urpmi.removemedia, was developed for Mandrake Linux (later Mandriva Linux) in the late 1990s as an advanced front-end for RPM package management. It distinguished itself by providing robust dependency resolution and comprehensive media management capabilities at a time when such features were not standard in RPM-based distributions. Its design emphasized user-friendliness and efficiency in handling software sources, directly influencing its continued use in distributions like Mageia.
SEE ALSO
urpmi(8), urpmi.addmedia(8), urpmi.update(8), urpmq(1), urpmf(1)