Red Hat Package Management
Installing RPMs
# rpm -i packagename
# rpm -ivh packagename
-v adds verbose feedback, and -h draws progress hashmarks
# rpm -ivh --test packagename
Upgrading RPMs
# rpm -Uvh packagename
To test the package install without really installing it.
# rpm -Uvh --test packagename
Removing RPMs
#rpm -e packagename does the job
# rpm -ev packagename
( You dont need to mention the entire package, (abcd-1.23.34.5.i386.rpm) just the label name (abcd).
Removing/Uninstalling multiple RPMs at once.
# rpm -ev packagename packagename packagename
If you dont want to check dependencies,
#rpm -ev --nodeps packagename
To test your command before uninstalling/removing
#rpm -ev --test packagename
Collecting information on Installed RPMs
Use RPM's querying features. All the queries start with rpm -q.
# rpm -q compiz# rpm -qa | grep ubuntu
Listing files in an installed package
# rpm -ql compiz
To list the documentation for an application, use
# rpm -qd ubuntu
To list the configuration files for a package, use
# rpm -qc compiz
Listing the configuration files for a command
# rpm -qcf /usr/bin/ssh
To list all the packages installed, use
# rpm -qa
To see what package a file belongs to, use
# rpm -qf /usr/bin/abcd
To display package information
# rpm -qi packagename
RPM queries will not follow symlinks, and will report that the file is "not owned by any package" To find the file that a symlink points to , use:
# namei ~/ronak
Collecting Information from RPMs that are not installed.
Listing documentation files
# rpm -qpd abcd.rpm
Listing all the files of the package:
# rpm -qp1 abcd.rpm
Listing dependencies this package requires,
# rpm -qpR abcd.rpm
To see what this package provides
# rpm -qp --provides abcd.rpm
Finding recentally installed RPMs
# rpm -qa --last
If the list is too long, rpm -qa --last | head.
Rebuild RPM database
# rpm --rebuilddb
Recreate RPM database
# rpm --initdb
No comments:
Post a Comment