{"id":763,"date":"2025-04-02T10:22:35","date_gmt":"2025-04-02T15:22:35","guid":{"rendered":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/?p=763"},"modified":"2025-04-02T10:22:35","modified_gmt":"2025-04-02T15:22:35","slug":"when-upgrading-os-dnf-and-rpm-fails-on-sha1-packages","status":"publish","type":"post","link":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/?p=763","title":{"rendered":"When upgrading OS, dnf and rpm fails on SHA1 packages"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">First, use<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">rpm -q gpg-pubkey &#8211;qf &#8216;%{NAME}-%{VERSION}-%{RELEASE}\\t%{SUMMARY}\\n&#8217;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">to identify keys from obsolete repositories, then use<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">rpm -e gpg-pubkey-xxxxxxxx-yyyyyyyy<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">to remove the keys that were imported from the SHA1 era.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then have the offending packages removed by<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">rpm -q &#8211;nosignature &#8211;querybynumber xxxx<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">where you can get the xxxx from the stderr messages from<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">rpm -qa &gt;\/dev\/null<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>First, use rpm -q gpg-pubkey &#8211;qf &#8216;%{NAME}-%{VERSION}-%{RELEASE}\\t%{SUMMARY}\\n&#8217; to identify keys from obsolete repositories, then use rpm -e gpg-pubkey-xxxxxxxx-yyyyyyyy to remove the keys that were imported from the SHA1 era. Then have the offending packages removed by rpm -q &#8211;nosignature &#8211;querybynumber xxxx where you can get the xxxx from the stderr messages from rpm -qa &gt;\/dev\/null<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,3],"tags":[],"class_list":["post-763","post","type-post","status-publish","format-standard","hentry","category-computer-tips","category-mri-technical-support","post-blog"],"_links":{"self":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/763","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=763"}],"version-history":[{"count":1,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/763\/revisions"}],"predecessor-version":[{"id":764,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/763\/revisions\/764"}],"wp:attachment":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=763"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=763"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=763"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}