View Full Version : Useful RPM commands
Jman
25th September 2004, 11:13 PM
RPM packages are the core of a Fedora system. RPM is powerful. A good query can tell you a lot about what's installed on your system.
Note that in most cases you don't have to use rpm directly, use yum (http://www.fedorafaq.org/#installsoftware).
(This is all on a terminal prompt.)
This is a basic query, getting some information: rpm -qi packagename
If you don't have it installed yet, just query the .rpm file: rpm -qip filename
To find the package a certain file belongs to: rpm -qf filename
This one lists all your packages sorted by size in decreasing order. Useful for seeing what's taking all the space on your system. (May take a moment to run) rpm -qa --queryformat '%{SIZE} %{NAME}\n' | sort -n -r | less
jcstille
26th September 2004, 03:11 AM
Just so if there are any people who have never used RPM packages and found this title interesting, to install a rpm use
rpm -ihv filename.rpm (This is one of many ways to do it)
imdeemvp
26th September 2004, 12:34 PM
and the: rpm -e filename to remove
foolish
26th September 2004, 07:43 PM
And for more: http://foolish.fedorausers.org/rpm/index.html
aje
25th October 2004, 07:24 AM
Thank you!
WebWind
26th October 2004, 07:01 AM
Thanx. Very good and usefull
Sicily1918
27th October 2004, 09:44 PM
And rpm -Fhv *.rpm, instead of -Uhv, updates only existing packages (-U will update if exists, and install if not present).
ozZ
27th October 2004, 09:54 PM
rpm -qa | grep "packagename"
will list the installed packages similar to "filename".
Can be really useful!
Psquared
27th October 2004, 09:56 PM
And for more: http://foolish.fedorausers.org/rpm/index.html
I had never been to your site before. I'm impressed and have bookmarked it for future reference. Great job. :)
thunder1
27th October 2004, 10:07 PM
foolish thanks for that link very usefull
engwnbie
27th October 2004, 10:14 PM
Hey I mean this with tongue and cheek. What are you guys new, always start and recommend the new people visit http://www.fedorafaq.org/ and http://foolish.fedorausers.org/ it answers a lot of questions.
engwnbie
27th October 2004, 10:18 PM
Jman sorry to jump in like this. Thanks for the mini how-to. It does help everyone and it is a refressure to the rest of us, meaning me.
Mat
28th October 2004, 12:54 AM
to extract the contents of a rpm w/o installing:
rpm2cpio foo.rpm | cpio -idv
this will extract everything into the current directory, so better copy the rpm to a seperate temporary folder first
Mat
Jman
28th October 2004, 09:39 PM
I don't mind links to other resources, in fact I encourage them. This is just a quick reference for people who search the How To forum for rpm queries.
dineshjk
29th October 2004, 06:47 PM
And for more: http://foolish.fedorausers.org/rpm/index.html
Really very much helpful.
Dinesh
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.