Home >> Linux >> How to rpm in fedora

How to rpm in fedora

Below Commands gives you an idea about how to use rpm in Redhat based distro like : fedora, centos, suse etc, it is a rpm cheat sheet by which you can easily understand its uses.

  • Install the package

# rpm -ivh {rpm-file}

  • Upgrade package

# rpm -Uvh {rpm-file}

  • Erase/remove/ an installed package

# rpm -ev {package}

  • Erase/remove/ an installed package without checking for dependencies

# rpm -ev –nodeps {package}

  • Display list all installed packages

# rpm -qa

  • Check to see if a certain package is installed

# rpm -qa | grep {package}

  • Display installed information along with package version and short description

# rpm -qi {package}

  • Find out what package a file belongs to i.e. find what package owns the file

# rpm -qf {/path/to/file}

  • Display list of configuration file(s) for a package

# rpm -qc {pacakge-name}

  • Display list of configuration files for a command

# rpm -qcf {/path/to/file}

  • Display list of all recently installed RPMs

# rpm -qa –last

  • Find out what dependencies a rpm file has

# rpm -qpR {.rpm-file}
# rpm -qR {package}

Leave a Reply

Your email address will not be published. Required fields are marked *

*

*