Install a single file from a package without installing the RPM

Posted in Linux

You don’t need to install an RPM package just to get to the files. This can be especially useful if you’re looking for the default configuration files or docs from a package. You don’t even need to unpack the whole RPM like I’ve done in the past.

rpm2cpio thing-1.0.x86_64.rpm | cpio -ivd etc/config.conf

You may have the package already installed and don’t want to reinstall it. It’s not pretty, and I wish rpm and yum provided a prettier method of extracting a file, but it works.

Posted by admica   @   14 July 2011

Related Posts

0 Comments

No comments yet. Be the first to leave a comment !
Leave a Comment

Name

Email

Website

*

Previous Post
«
Next Post
»
Powered by Wordpress   |   Lunated designed by ZenVerse

Valid XHTML 1.0 Transitional