{"id":28353,"date":"2024-06-21T16:37:15","date_gmt":"2024-06-21T16:37:15","guid":{"rendered":"https:\/\/green.cloud\/docs\/docs\/greencloud-documents\/linux-operating-systems\/how-to-fix-update-failed-on-linux\/"},"modified":"2026-01-19T00:45:45","modified_gmt":"2026-01-19T00:45:45","slug":"how-to-fix-update-failed-on-linux","status":"publish","type":"docs","link":"https:\/\/green.cloud\/docs\/how-to-fix-update-failed-on-linux\/","title":{"rendered":"How to fix update failed on Linux"},"content":{"rendered":"<p>In this article, you will learn how to fix some common update errors that occur frequently when you try to update on the Linux operating system. Below are 4 error cases encountered when we run updates on our Almalinux, Centos, and Debian 12 versions.<\/p>\n<p><iframe title=\"How to fix some update errors on Linux | VPS Tutorial\" width=\"1170\" height=\"658\" src=\"https:\/\/www.youtube.com\/embed\/CTRuDWDJkkE?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<h3>1. \u201c<strong>Error: Failed to download metadata for repo \u2018appstream\u2019: Cannot prepare internal mirrorlist: No URLs in mirrorlist<\/strong>\u201d<\/h3>\n<p>If you, for one reason or the other, are still actively using\u00a0<strong>CentOS 8<\/strong>, you might probably have encountered the following error when trying to update your system or simply install a package.<\/p>\n<p>For example, in the screenshot that follows, I was trying run update\u00a0 and ran into it.<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone wp-image-28359 size-large\" src=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/nw14-1024x80.png\" alt=\"\" width=\"1024\" height=\"80\" srcset=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/nw14-1024x80.png 1024w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/nw14-300x23.png 300w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/nw14-768x60.png 768w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/nw14-20x2.png 20w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/nw14-32x2.png 32w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/nw14.png 1144w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<h5>What is the Cause of This Error?<\/h5>\n<p>You may well be aware that\u00a0<strong>CentOS Linux 8<\/strong>\u00a0died a premature death, it reached the End Of Life (EOL) on December 31st, 2021, thus it no longer receives development resources from the official CentOS project.<\/p>\n<p>This means that after Dec 31st, 2021, to update your CentOS installation, you are required to change the mirrors to\u00a0CentOS Vault Mirror, where they will be archived permanently.<\/p>\n<h5 id=\"h_01HAMMP99XZ6BXNEK5JHQ5RG2B\">Solution<\/h5>\n<p>To fix the above error, open your terminal or login via SSH, and run the following commands to change the repo URL to point to <strong>vault.centos.org<\/strong>, from the official CentOS repos.<\/p>\n<p>Here we use the\u00a0<strong>sed<\/strong>\u00a0command to edit the required directives or parameters in the repo configuration files:<\/p>\n<pre># sed -i 's\/mirrorlist\/#mirrorlist\/g' \/etc\/yum.repos.d\/CentOS-*\r\n# sed -i 's|#baseurl=http:\/\/mirror.centos.org|baseurl=http:\/\/vault.centos.org|g' \/etc\/yum.repos.d\/CentOS-*<\/pre>\n<p>Alternatively, you can also point to the Cloudflare-based vault repository, by running the following commands:<\/p>\n<pre># sed -i 's\/mirrorlist\/#mirrorlist\/g' \/etc\/yum.repos.d\/CentOS-Linux-*\r\n# sed -i 's|#baseurl=http:\/\/mirror.centos.org|baseurl=http:\/\/vault.epel.cloud|g' \/etc\/yum.repos.d\/CentOS-Linux-*<\/pre>\n<p>Now you should be able to update\u00a0<strong>CentOS<\/strong> or install packages without any error<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-28361 size-large\" src=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/nw16-1024x187.png\" alt=\"\" width=\"1024\" height=\"187\" srcset=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/nw16-1024x187.png 1024w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/nw16-300x55.png 300w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/nw16-768x140.png 768w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/nw16-20x4.png 20w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/nw16-32x6.png 32w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/nw16.png 1144w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<h3>2. Error: GPG check FAILED<\/h3>\n<p>When installing packages on AlmaLinux, if you run into a \u201cGPG check failed\u201d problem, it means that the available GPG keys were unable to verify the signature of the package. A corrupt repository, an out-of-date or missing GPG key, or network problems could all be the cause of this.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-28363 size-large\" src=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/nw17-1024x161.png\" alt=\"\" width=\"1024\" height=\"161\" srcset=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/nw17-1024x161.png 1024w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/nw17-300x47.png 300w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/nw17-768x121.png 768w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/nw17-20x3.png 20w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/nw17-32x5.png 32w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/nw17.png 1227w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<h5 id=\"h_01HAMMP99X5YRZ1CFMW7ZERF83\">Cause<\/h5>\n<p>The GPG key for the xfsdump package was not installed, resulting in a GPG check failure during the package installation, which was resolved by importing the necessary key from the AlmaLinux repository.<\/p>\n<p>cloudlinux-release-8.9-2.el8 package contains an updated AlmaLinux key, but won&#8217;t help with current systems<\/p>\n<h5 id=\"h_01HAMMP99XZ6BXNEK5JHQ5RG2B\">Solution<\/h5>\n<p>Update the GPG keys that we use to verify packages. Importing the most recent GPG keys from the repository will enable us to perform this. So, we can run the following command:<\/p>\n<pre># rpm --import https:\/\/repo.almalinux.org\/almalinux\/RPM-GPG-KEY-AlmaLinux<\/pre>\n<p>Now you should be able to update Almalinux\u00a0or install packages without any error:<\/p>\n<h3>3. Error: sub-process &#8211; apt-listchanges<\/h3>\n<p>I keep on getting this error when I try to install or upgrade on Debian 12 and almost everything.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-29047 size-large\" src=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/image-eror2-1024x107.png\" alt=\"\" width=\"1024\" height=\"107\" srcset=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/image-eror2-1024x107.png 1024w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/image-eror2-300x31.png 300w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/image-eror2-768x80.png 768w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/image-eror2-20x2.png 20w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/image-eror2-32x3.png 32w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/image-eror2.png 1446w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<h5 id=\"h_01HAMMP99XZ6BXNEK5JHQ5RG2B\">Solution<\/h5>\n<p>You can fix the error by running the following command<\/p>\n<pre class=\"lang-py s-code-block\"><code class=\"hljs language-python\" data-highlighted=\"yes\"># mv \/etc\/apt\/apt.conf.d\/<span class=\"hljs-number\">20l<\/span>istchanges \/etc\/apt\/apt.conf.d\/<span class=\"hljs-number\">20l<\/span>istchanges.bak<\/code><\/pre>\n<h3>4. Error: The repository cdrom does not have a release file&#8221;<\/h3>\n<p>You can see detailed error correction here: <a href=\"https:\/\/green.cloud\/docs\/how-to-fix-the-repository-cdrom-does-not-have-a-release-file-error-on-debian-12\/\">How to fix &#8220;the repository cdrom does not have a release file&#8221; error on Debian 12<\/a><\/p>\n<h3>Conclusion<\/h3>\n<p>And there you have it! A comprehensive guide to fixing the update errors in Linux versions. Trust me, I\u2019ve faced this error more times than I can count and these steps have helped me every single time.<\/p>\n<p>Good Luck!<\/p>\n<p><a href=\"https:\/\/greencloudvps.com\/billing\/aff.php?aff=2871\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18943\" src=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2023\/03\/KVM-VPS_banner_2.png\" alt=\"\" width=\"1280\" height=\"214\" srcset=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2023\/03\/KVM-VPS_banner_2.png 1280w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2023\/03\/KVM-VPS_banner_2-300x50.png 300w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2023\/03\/KVM-VPS_banner_2-1024x171.png 1024w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2023\/03\/KVM-VPS_banner_2-768x128.png 768w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2023\/03\/KVM-VPS_banner_2-20x3.png 20w\" sizes=\"(max-width: 1280px) 100vw, 1280px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, you will learn how to fix some common update errors that occur frequently when you try to update on the Linux operating system. Below are 4 error cases encountered when we run updates on our Almalinux, Centos, and Debian 12 versions. 1. \u201cError: Failed to download metadata for repo \u2018appstream\u2019: Cannot prepare [&hellip;]<\/p>\n","protected":false},"author":19,"featured_media":0,"parent":17817,"menu_order":336,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-28353","docs","type-docs","status-publish","hentry","no-post-thumbnail"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to fix update failed on Linux - GreenCloud Documentation<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/green.cloud\/docs\/how-to-fix-update-failed-on-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to fix update failed on Linux - GreenCloud Documentation\" \/>\n<meta property=\"og:description\" content=\"In this article, you will learn how to fix some common update errors that occur frequently when you try to update on the Linux operating system. Below are 4 error cases encountered when we run updates on our Almalinux, Centos, and Debian 12 versions. 1. \u201cError: Failed to download metadata for repo \u2018appstream\u2019: Cannot prepare [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/green.cloud\/docs\/how-to-fix-update-failed-on-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"GreenCloud Documentation\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-19T00:45:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/nw14.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1144\" \/>\n\t<meta property=\"og:image:height\" content=\"89\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/how-to-fix-update-failed-on-linux\\\/\",\"url\":\"https:\\\/\\\/green.cloud\\\/docs\\\/how-to-fix-update-failed-on-linux\\\/\",\"name\":\"How to fix update failed on Linux - GreenCloud Documentation\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/how-to-fix-update-failed-on-linux\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/how-to-fix-update-failed-on-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/green.cloud\\\/docs\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/nw14-1024x80.png\",\"datePublished\":\"2024-06-21T16:37:15+00:00\",\"dateModified\":\"2026-01-19T00:45:45+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/how-to-fix-update-failed-on-linux\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/green.cloud\\\/docs\\\/how-to-fix-update-failed-on-linux\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/how-to-fix-update-failed-on-linux\\\/#primaryimage\",\"url\":\"https:\\\/\\\/green.cloud\\\/docs\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/nw14.png\",\"contentUrl\":\"https:\\\/\\\/green.cloud\\\/docs\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/nw14.png\",\"width\":1144,\"height\":89},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/how-to-fix-update-failed-on-linux\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/green.cloud\\\/docs\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"GreenCloud Documents\",\"item\":\"https:\\\/\\\/green.cloud\\\/docs\\\/docs\\\/greencloud-documents\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Linux Operating Systems\",\"item\":\"https:\\\/\\\/green.cloud\\\/docs\\\/linux-operating-systems\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"How to fix update failed on Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/#website\",\"url\":\"https:\\\/\\\/green.cloud\\\/docs\\\/\",\"name\":\"GreenCloud Documentation\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/green.cloud\\\/docs\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to fix update failed on Linux - GreenCloud Documentation","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/green.cloud\/docs\/how-to-fix-update-failed-on-linux\/","og_locale":"en_US","og_type":"article","og_title":"How to fix update failed on Linux - GreenCloud Documentation","og_description":"In this article, you will learn how to fix some common update errors that occur frequently when you try to update on the Linux operating system. Below are 4 error cases encountered when we run updates on our Almalinux, Centos, and Debian 12 versions. 1. \u201cError: Failed to download metadata for repo \u2018appstream\u2019: Cannot prepare [&hellip;]","og_url":"https:\/\/green.cloud\/docs\/how-to-fix-update-failed-on-linux\/","og_site_name":"GreenCloud Documentation","article_modified_time":"2026-01-19T00:45:45+00:00","og_image":[{"width":1144,"height":89,"url":"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/nw14.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/green.cloud\/docs\/how-to-fix-update-failed-on-linux\/","url":"https:\/\/green.cloud\/docs\/how-to-fix-update-failed-on-linux\/","name":"How to fix update failed on Linux - GreenCloud Documentation","isPartOf":{"@id":"https:\/\/green.cloud\/docs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/green.cloud\/docs\/how-to-fix-update-failed-on-linux\/#primaryimage"},"image":{"@id":"https:\/\/green.cloud\/docs\/how-to-fix-update-failed-on-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/nw14-1024x80.png","datePublished":"2024-06-21T16:37:15+00:00","dateModified":"2026-01-19T00:45:45+00:00","breadcrumb":{"@id":"https:\/\/green.cloud\/docs\/how-to-fix-update-failed-on-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/green.cloud\/docs\/how-to-fix-update-failed-on-linux\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/green.cloud\/docs\/how-to-fix-update-failed-on-linux\/#primaryimage","url":"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/nw14.png","contentUrl":"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/06\/nw14.png","width":1144,"height":89},{"@type":"BreadcrumbList","@id":"https:\/\/green.cloud\/docs\/how-to-fix-update-failed-on-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/green.cloud\/docs\/"},{"@type":"ListItem","position":2,"name":"GreenCloud Documents","item":"https:\/\/green.cloud\/docs\/docs\/greencloud-documents\/"},{"@type":"ListItem","position":3,"name":"Linux Operating Systems","item":"https:\/\/green.cloud\/docs\/linux-operating-systems\/"},{"@type":"ListItem","position":4,"name":"How to fix update failed on Linux"}]},{"@type":"WebSite","@id":"https:\/\/green.cloud\/docs\/#website","url":"https:\/\/green.cloud\/docs\/","name":"GreenCloud Documentation","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/green.cloud\/docs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/docs\/28353","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/comments?post=28353"}],"version-history":[{"count":12,"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/docs\/28353\/revisions"}],"predecessor-version":[{"id":30287,"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/docs\/28353\/revisions\/30287"}],"up":[{"embeddable":true,"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/docs\/17817"}],"wp:attachment":[{"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/media?parent=28353"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/doc_tag?post=28353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}