Install, upgrade, and remove RPM packages

by
Ryan
on
October 22, 2008

RPM stands for Red Hat Package Manager. There are a variety of distributions besides Red Hat that use RPM to manage packages including Fedora, Mandriva, SUSE, CentOS, and Yellow Dog Linux among others. RPM uses a database to keep track of what packages have been installed on the system and where they are located. This functionality allows you to easily query, install, upgrade, and remove packages from your system.

RPM packages are distributed in the following format “<package>.<version>.<architecture>.rpm

The rpm command requires root privileges so switch to root or use sudo.

Before installing a package you can check the package information.

# rpm -qi mypackage.1.2.3.x86_64.rpm

You can also list the files that will be installed.

# rpm -ql mypackage.1.2.3.x86_64.rpm

Once you are sure about the contents of the package you can install an RPM package with the ‘-i‘ option.

# rpm -i mypackage.1.2.3.x86_64.rpm

To upgrade a package that is already installed.

# rpm -U mypackage.2.0.0.x86_64.rpm

To remove a package you only need to provide the package name and not the version or rpm suffix.

# rpm -e mypackage

To view all the installed packages on your system.

# rpm -qa

If you want to see more output you can increase the verbosity by adding the ‘-v‘ option to any of these commands. To raise it even further you can add ‘-vv‘.

No Comments
red hat
, , , , ,

Related posts:

  1. Install Boxee on 64-bit Ubuntu 9.10 Karmic
    Installing Boxee turns your computer into an incredible HTPC. These instructions will help you get...

Comments (0)

No comments yet

Trackbacks (0)

No trackbacks yet

Leave a Comment

(displayed with your post)
(will not be published)
(optional)
Copyright 2008-2010 WiredRevolution.com. All rights reserved.