Home » Questions » Computers [ Ask a new question ]

How to extract RPM from RPM database on Red Hat Enterprise Linux

How to extract RPM from RPM database on Red Hat Enterprise Linux

Is there a way to extract an installed RPM from an RPM database on Red Hat Enterprise Linux to reproduce the original .rpm file?

Asked by: Guest | Views: 318
Total answers/comments: 1
bert [Entry]

"If you want to save a copy of the package as currently installed before upgrading or removing it, use rpm --repackage -- it'll save the RPMs in /var/tmp or /var/spool/repackage or elsewhere, depending on your configuration.

Otherwise, there exists rpmrebuild, which does exactly what you ask for.

Word of caution: with neither of these tools do you obtain the exact same *.rpm as the one you started from. Any changes to the installed files belong to the package will be in the RPMs generated."