2. Media Management

Software media are the different “sources” where you can install packages from. There must be at least one medium defined for urpmi to work. Predefined media include the ones you used to install your system (network, CD, DVD, etc.). You should define other media to install bugfixes and security updates. Adding and removing media is easy, but the syntax must be strictly respected.

2.1. Adding New Media

urpmi.addmedia <name> <URL>

This command allows you to add a new medium either from a local drive, a removable device (CD/DVD), or from the network through the HTTP, FTP, NFS, ssh or rsync protocols. The URL syntax varies for each of these media so you are encouraged to consult the urpmi.addmedia(8) man page before using it.

[Tip]Tip

If you are adding a new update medium, use the --update option on your urpmi.addmedia command line.

You can use online resources such as the Easy Urpmi Page if you don't know where to find media containing useful applications specially packaged for your Mandriva Linux system. The Mandriva Club site also provides the Urpmi media module for test and contribution packages.

[Note]Note

The Mandriva Club media list is only available to its members.

2.2. Removing Media

urpmi.removemedia <name>

This command will simply remove the medium name. If you cannot remember the medium's name, issuing urpmi.removemedia alone on the command line will list all defined media.

2.3. Updating Media

urpmi.update <name>

This command scans the named medium and updates the package list associated with it. This is useful for media which change often, such as the security and bugfix updates ones. Use the -a option to rescan all the defined media.

2.4. Media Order

The order in which media are defined in the /etc/urpmi/urpmi.cfg file is important because it dictates the medium from which packages will be installed when there is more than one media providing a given package: packages will be installed from the first listed medium which contains them.

[Note]Note

When adding network media, they'll be added before removable and local media. This is mainly because networked media is expected to have more up-to-date packages than removable or local ones.