RPM

Command
Description
# rpm -ivh [package.rpm]
install a rpm package
# rpm -ivh --nodeps [package.rpm]
install a rpm package ignoring dependencies requests
# rpm -U [package.rpm]
upgrade a rpm package without changing configuration files
# rpm -F [package.rpm]
upgrade a rpm package only if it is already installed  
# rpm -e [package]
remove a rpm package
# rpm -qa
show all rpm packages installed on the system
# rpm -qa | grep httpd
show all rpm packages with the name "httpd"
# rpm -qi [package]
obtain information on a specific package installed
# rpm -qg "System Environment/Daemons"
show rpm packages of a group software
# rpm -ql [package]
show list of files provided by a rpm package installed
# rpm -qc [package]
show list of configuration files provided by a rpm package installed
# rpm -q [package] --whatrequires
show list of dependencies required for a rpm packet
# rpm -q [package] --whatprovides
show capability provided by a rpm package
# rpm -q [package] --scripts
show scripts started during installation / removal
# rpm -q [package] --changelog
show history of revisions of a rpm package
# rpm -qf /etc/httpd/conf/httpd.conf
verify which rpm package belongs to a given file
# rpm -qp [package.rpm] -l
show list of files provided by a rpm package not yet installed
# rpm --import /media/cdrom/RPM-GPG-KEY
import public-key digital signature
# rpm --checksig [package.rpm]
verify the integrity of a rpm package
# rpm -qa gpg-pubkey
verify integrity of all rpm packages installed
# rpm -V [package]
check file size, permissions, type, owner, group, MD5 checksum and last modification
# rpm -Va
check all rpm packages installed on the system - use with caution
# rpm -Vp [package.rpm]
verify a rpm package not yet installed
# rpm -ivh /usr/src/redhat/RPMS/`arch`/[package.rpm]
install a package built from a rpm source
# rpm2cpio [package.rpm] | cpio --extract --make-directories *bin*
extract executable file from a rpm package
# rpmbuild --rebuild [package.src.rpm]
build a rpm package from a rpm source



Syntax
Description
Example(s)
rpm -ivh {rpm-file}
Install the package
rpm -ivh mozilla-mail-1.7.5-17.i586.rpm
rpm -ivh --test mozilla-mail-1.7.5-17.i586.rpm
rpm -Uvh {rpm-file}
Upgrade package
rpm -Uvh mozilla-mail-1.7.6-12.i586.rpm
rpm -Uvh --test mozilla-mail-1.7.6-12.i586.rpm
rpm -ev {package}
Erase/remove/ an installed package
rpm -ev mozilla-mail
rpm -ev --nodeps {package}
Erase/remove/ an installed package without checking for dependencies
rpm -ev --nodeps mozilla-mail
rpm -qa
Display list all installed packages
rpm -qa
rpm -qa | less
rpm -qi {package}
Display installed information along with package version and short description
rpm -qi mozilla-mail
rpm -qf {/path/to/file}
Find out what package a file belongs to i.e. find what package owns the file
rpm -qf /etc/passwd
rpm -qf /bin/bash
rpm -qc {pacakge-name}
Display list of configuration file(s) for a package
rpm -qc httpd
rpm -qcf {/path/to/file}
Display list of configuration files for a command
rpm -qcf /usr/X11R6/bin/xeyes
rpm -qa --last
Display list of all recently installed RPMs
rpm -qa --last
rpm -qa --last | less
rpm -qpR {.rpm-file}
rpm -qR {package}
Find out what dependencies a rpm file has
rpm -qpR mediawiki-1.4rc1-4.i586.rpm
rpm -qR bash





   yum list [available|installed|extras|updates|obsoletes|all|recent] [pkgspec] 

This command lets you list packages in any repository enabled on your system or installed. It also lets you list specific types of packages as well as refine your list with a package specification of any of the package's name, arch, version, release, epoch.

   yum list

By default 'yum list' without any options will list all packages in all the repositories and all the packages installed on your system. Note: 'yum list all' and 'yum list' give the same output.

   yum list available
Lists all the packages available to be installed in any enabled repository on your system.

   yum list installed
This is equivalent to rpm -qa. It lists all the packages installed on the system.

   yum list extras
This command lists any installed package which no longer appears in any of your enabled repositories. Useful for finding packages which linger between upgrades or things installed not from a repo.

   yum list obsoletes
This command lists any obsoleting relationships between any available package and any installed package.

   yum list updates
This command lists any package in an enabled repository which is an update for any installed package.

   yum list recent
This command lists any package added to any enabled repository in the last seven(7) days.

   yum list pkgspec
This command allows you to refine your listing for particular packages.

Examples of pkgspecs:

      yum list zsh 
      yum list joe\* 
      yum list \*.i386 
      yum list dovecot-1.0.15 
   yum install/remove/update

Comments

Popular posts from this blog

RAID

Wild Cards