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?
redhat-enterprise-linux rpm
migrated from stackoverflow.com Jun 27 '11 at 22:13
This question came from our site for professional and enthusiast programmers.
add a comment |
Is there a way to extract an installed RPM from an RPM database on Red Hat Enterprise Linux to reproduce the original .rpm file?
redhat-enterprise-linux rpm
migrated from stackoverflow.com Jun 27 '11 at 22:13
This question came from our site for professional and enthusiast programmers.
Why was this title modified? Red Hat is the name of the software not RedcHat
– Ramhound
Dec 13 '18 at 1:40
add a comment |
Is there a way to extract an installed RPM from an RPM database on Red Hat Enterprise Linux to reproduce the original .rpm file?
redhat-enterprise-linux rpm
Is there a way to extract an installed RPM from an RPM database on Red Hat Enterprise Linux to reproduce the original .rpm file?
redhat-enterprise-linux rpm
redhat-enterprise-linux rpm
edited Dec 13 '18 at 1:45
Ramhound
19.5k156085
19.5k156085
asked Oct 10 '08 at 12:45
John in MD
14415
14415
migrated from stackoverflow.com Jun 27 '11 at 22:13
This question came from our site for professional and enthusiast programmers.
migrated from stackoverflow.com Jun 27 '11 at 22:13
This question came from our site for professional and enthusiast programmers.
Why was this title modified? Red Hat is the name of the software not RedcHat
– Ramhound
Dec 13 '18 at 1:40
add a comment |
Why was this title modified? Red Hat is the name of the software not RedcHat
– Ramhound
Dec 13 '18 at 1:40
Why was this title modified? Red Hat is the name of the software not RedcHat
– Ramhound
Dec 13 '18 at 1:40
Why was this title modified? Red Hat is the name of the software not RedcHat
– Ramhound
Dec 13 '18 at 1:40
add a comment |
2 Answers
2
active
oldest
votes
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.
1
I believe it's worthwhile to note thatrpm --repackagewillRe-package the files before erasingrpm.org/max-rpm-snapshot/rpm.8.html I almost ran this command blindly, but looked at the linked docs first.
– Kevin Meredith
May 31 '13 at 12:25
rpm --repackagedoesn't appear to be available on newer (e.g., RHEL 7) systems.rpmrebuildis available in the EPEL for RHEL 7 and did the trick for me.
– jayhendren
Dec 28 '17 at 19:54
add a comment |
Producing the original rpm file isn't possible, it's been extracted and possibly discarded. The rpm database has information about what files it's installed and their checksums, permissions, and the postinst scripts:
# verify package contents
rpm -q packagename --verify
# read the scripts that run on installation and removal
rpm -q packagename --scripts
will give you some information.
If you want to obtain an rpm from the respository, I recommend using yumdownloader, from the yum-utils package.
yum install yum-utils
yumdownloader packagename
This will download the latest rpm, not the one that is installed currently.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f303083%2fhow-to-extract-rpm-from-rpm-database-on-red-hat-enterprise-linux%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
1
I believe it's worthwhile to note thatrpm --repackagewillRe-package the files before erasingrpm.org/max-rpm-snapshot/rpm.8.html I almost ran this command blindly, but looked at the linked docs first.
– Kevin Meredith
May 31 '13 at 12:25
rpm --repackagedoesn't appear to be available on newer (e.g., RHEL 7) systems.rpmrebuildis available in the EPEL for RHEL 7 and did the trick for me.
– jayhendren
Dec 28 '17 at 19:54
add a comment |
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.
1
I believe it's worthwhile to note thatrpm --repackagewillRe-package the files before erasingrpm.org/max-rpm-snapshot/rpm.8.html I almost ran this command blindly, but looked at the linked docs first.
– Kevin Meredith
May 31 '13 at 12:25
rpm --repackagedoesn't appear to be available on newer (e.g., RHEL 7) systems.rpmrebuildis available in the EPEL for RHEL 7 and did the trick for me.
– jayhendren
Dec 28 '17 at 19:54
add a comment |
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.
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.
answered Oct 10 '08 at 14:32
ephemient
19k42319
19k42319
1
I believe it's worthwhile to note thatrpm --repackagewillRe-package the files before erasingrpm.org/max-rpm-snapshot/rpm.8.html I almost ran this command blindly, but looked at the linked docs first.
– Kevin Meredith
May 31 '13 at 12:25
rpm --repackagedoesn't appear to be available on newer (e.g., RHEL 7) systems.rpmrebuildis available in the EPEL for RHEL 7 and did the trick for me.
– jayhendren
Dec 28 '17 at 19:54
add a comment |
1
I believe it's worthwhile to note thatrpm --repackagewillRe-package the files before erasingrpm.org/max-rpm-snapshot/rpm.8.html I almost ran this command blindly, but looked at the linked docs first.
– Kevin Meredith
May 31 '13 at 12:25
rpm --repackagedoesn't appear to be available on newer (e.g., RHEL 7) systems.rpmrebuildis available in the EPEL for RHEL 7 and did the trick for me.
– jayhendren
Dec 28 '17 at 19:54
1
1
I believe it's worthwhile to note that
rpm --repackage will Re-package the files before erasing rpm.org/max-rpm-snapshot/rpm.8.html I almost ran this command blindly, but looked at the linked docs first.– Kevin Meredith
May 31 '13 at 12:25
I believe it's worthwhile to note that
rpm --repackage will Re-package the files before erasing rpm.org/max-rpm-snapshot/rpm.8.html I almost ran this command blindly, but looked at the linked docs first.– Kevin Meredith
May 31 '13 at 12:25
rpm --repackage doesn't appear to be available on newer (e.g., RHEL 7) systems. rpmrebuild is available in the EPEL for RHEL 7 and did the trick for me.– jayhendren
Dec 28 '17 at 19:54
rpm --repackage doesn't appear to be available on newer (e.g., RHEL 7) systems. rpmrebuild is available in the EPEL for RHEL 7 and did the trick for me.– jayhendren
Dec 28 '17 at 19:54
add a comment |
Producing the original rpm file isn't possible, it's been extracted and possibly discarded. The rpm database has information about what files it's installed and their checksums, permissions, and the postinst scripts:
# verify package contents
rpm -q packagename --verify
# read the scripts that run on installation and removal
rpm -q packagename --scripts
will give you some information.
If you want to obtain an rpm from the respository, I recommend using yumdownloader, from the yum-utils package.
yum install yum-utils
yumdownloader packagename
This will download the latest rpm, not the one that is installed currently.
add a comment |
Producing the original rpm file isn't possible, it's been extracted and possibly discarded. The rpm database has information about what files it's installed and their checksums, permissions, and the postinst scripts:
# verify package contents
rpm -q packagename --verify
# read the scripts that run on installation and removal
rpm -q packagename --scripts
will give you some information.
If you want to obtain an rpm from the respository, I recommend using yumdownloader, from the yum-utils package.
yum install yum-utils
yumdownloader packagename
This will download the latest rpm, not the one that is installed currently.
add a comment |
Producing the original rpm file isn't possible, it's been extracted and possibly discarded. The rpm database has information about what files it's installed and their checksums, permissions, and the postinst scripts:
# verify package contents
rpm -q packagename --verify
# read the scripts that run on installation and removal
rpm -q packagename --scripts
will give you some information.
If you want to obtain an rpm from the respository, I recommend using yumdownloader, from the yum-utils package.
yum install yum-utils
yumdownloader packagename
This will download the latest rpm, not the one that is installed currently.
Producing the original rpm file isn't possible, it's been extracted and possibly discarded. The rpm database has information about what files it's installed and their checksums, permissions, and the postinst scripts:
# verify package contents
rpm -q packagename --verify
# read the scripts that run on installation and removal
rpm -q packagename --scripts
will give you some information.
If you want to obtain an rpm from the respository, I recommend using yumdownloader, from the yum-utils package.
yum install yum-utils
yumdownloader packagename
This will download the latest rpm, not the one that is installed currently.
answered Oct 10 '08 at 13:02
Jerub
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f303083%2fhow-to-extract-rpm-from-rpm-database-on-red-hat-enterprise-linux%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Why was this title modified? Red Hat is the name of the software not RedcHat
– Ramhound
Dec 13 '18 at 1:40