Re: How can I extract a single file from an rpm package?



Try rpmdev-extract filename.rpm , it will extract all files in the rpm
and then take which one you like it.

Leonard Evens wrote:
On two occasions, I've wanted just one file from an rpm package.

First, I accidentally deleted a file, so i downloaded the rpm package in
which it lay. I could of course reinstall or upgrade the package witha
force option,. That would replace everything including the missing
file. But that seems inelegant, and I worry a bit about making a mistake.

Second, I wanted just one file from another pckage which contained a
variety of old libraries, most of which I already had. I didn't want to
take a chance that the other libraries in the rpm package were identical
to the ones I already had. So I wanted to extract just the needed
library and put it where it belongs.

Unless I'm mistaken, rpm doesn't seem to allow you to extract just one
file. I've also tried to unpack the package so it ends up starting
with a different path than the default one, but I couldn't get that to work.

Any ideas?

.