urpmi and rpm

29 01 2008

[urpmi and rpm] Installing and managing software via konsole in Mandriva.

Just about everywhere you’ve likely read apt-get <program_name> or yum <program_name> in various Howto’s. So how do we do it? Mandriva uses the urpmi command; the basic command is urpmi <program_name>. It functions virtually the same a Debian’s apt; solving the dependencies automatically.

The first thing we need to do is to set up the urpmi repositories. To do so; head over to Easy Urmpi and follow through the steps and Easy Urpmi will generate the command to enter into konsole to add the sources.

  • Step 1: Select your Mandriva Version and Architecture and the Package Manager [urpmi]
  • Step 2: Select a mirror for each source you want [You can also add a prefix to the media name which is optional]
  • Step 3: Copy the output and paste [Shift + Insert] into Konsole as root.

For more info on the different software repositories see the Mandriva Wiki. The PLF [Penguin Liberation Front] sources are software that can not be included in the official Mandriva sources due to various reasons; for more info see the about page @ the PLF site.

The software management applications consist of urpmi, urpme, urpmf or urpmq, urpmi.addmedia and urpmi.removemedia.


urpmi is the installation tool, it will install the package and all it’s dependencies

  • urpmi <package_name>

To update the media and install all packages with newer versions use:

  • urpmi –auto-update

A few useful flags are:

  • update : Use only update media to restrict the upgrades to security updates.
  • auto : Automatically installs dependencies without asking
  • auto-select: Automatically upgrades all packages which have newer versions. For example you can use –auto-update –auto-select
  • clean : Clears the rpm cache located at /var/cache/urpmi/rpms
  • noclean : Does not flush the rpm cache
  • fuzzy : Allows a fuzzy search on the package name, which will search for similar packages names and returns a list of possibilities.
  • help : To display the full list of options

You can also use urpmi to install packages and resolve dependencies for packages that you have previously downloaded or have urpmi retrieve the package from a website. Example:


urpme is the software removal tool.

  • urpme <package_name>

A couple useful flags are:

  • test : verify if the removal can be achieved correctly
  • force : force invocation even if some packages do not exist

urpmq | urmpf

urpmq and urpmf are search tools which can be used with regular user privileges. Use urpmf to find what packages contain a certain file and urpmq for all other queries.

urpmf examples:

  • urpmf –provides firefox
  • urpmf –filename firefox

urpmq will query the database for the exact package name you define. The –fuzzy flag will return all variations of the name queried. To understand the differences try the following commands and observe the output:

  • urpmq xmm
  • urpmq xmms
  • urpmq –fuzzy xmms

A few useful flags for urpmq are:

  • –fuzzy : returns results with similar names
  • -i : displays a summary and description of the package [example: urpmq -i xmms ] | note: only works with full hdlists, not with synthesis
  • list-media : lists all known media


You’ll rarely use the rpm command as urpmi will likely do everything you need. In the rare case you do use the rpm command here are a few useful commands:

  • rpm -qa [Lists all packages installed on your system | you can export the list for easier reading and searching: rpm -qa > package_list
  • rpm -qi <package_name> [To display a summary and description of a package already installed]
  • rpm -qpi somefile.name.rpm [To display a summary and description of a rpm package | either list the full path to the rpm file or work from the directory that contains the file]
  • rpm -Uvh <package_name> [Install/upgrade a package, being verbose and displaying hash-marks as a progress indicator]
  • rpm -q –changelog <package_name> [To display the change log for an installed package]
  • rpm –help [To display the full list of options]

There are other ways of installing software that isn’t available through the Mandriva repositories, such as executing a bin file or rolling your own from a tarball but I’ll leave those for another post.

This work is licensed under a
Creative Commons Licence.

Blogged with Flock

Tags: , , ,




One response

5 09 2009

thanks!!! very usefull!
iam new whit mandriva

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: