{"id":1303,"date":"2023-10-09T11:28:48","date_gmt":"2023-10-09T05:58:48","guid":{"rendered":"https:\/\/www.veeble.org\/kb\/?p=1303"},"modified":"2025-04-15T13:02:11","modified_gmt":"2025-04-15T07:32:11","slug":"troubleshooting-failed-to-synchronize-cache-for-repo-appstream-error","status":"publish","type":"post","link":"https:\/\/www.veeble.com\/kb\/troubleshooting-failed-to-synchronize-cache-for-repo-appstream-error\/","title":{"rendered":"Troubleshooting &#8220;Failed to Synchronize Cache for Repo appstream&#8221; Error in CentOS 8"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large is-style-default\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2023\/10\/1.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"98\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2023\/10\/1-1024x98.jpg\" alt=\"appstream error\" class=\"wp-image-1306\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/10\/1-1024x98.jpg 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/10\/1-300x29.jpg 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/10\/1-768x73.jpg 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/10\/1-60x6.jpg 60w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/10\/1-150x14.jpg 150w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/10\/1.jpg 1204w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>The very recently I had encounterd the &#8220;Failed to synchronize cache for repo &#8216;<a href=\"https:\/\/en.wikipedia.org\/wiki\/AppStream\" target=\"_blank\" rel=\"noopener\">appstream<\/a>&#8216;&#8221; error in CentOS 8 which is frustrating, but it&#8217;s a common issue with multiple potential causes. Here, in this guide I will provide steps to resolve this problem.<\/p>\n\n\n\n<p>Before diving into the solution, let&#8217;s understand the common reasons behind this error:<\/p>\n\n\n\n<p><strong>Identifying Common Causes:<\/strong><\/p>\n\n\n\n<p>Before diving into the solution, let&#8217;s understand the common reasons behind this error:<\/p>\n\n\n\n<p><strong>1. Incorrect Date and Time Settings:<\/strong>  Ensure your system&#8217;s date and time settings are accurate, including the correct time zone.<\/p>\n\n\n\n<p><strong>2. Old or Expired DNF Cache: <\/strong>Stale DNF cache can lead to synchronization issues. Cleaning the cache is often necessary.<\/p>\n\n\n\n<p><strong>3.<\/strong> <strong>CentOS BaseURL:<\/strong> Since CentOS 8 reached its End Of Life (EOL) on December 31, 2021, you may need to switch from &#8220;mirror.centos.org&#8221; to &#8220;vault.centos.org&#8221; for updates.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"fixing-incorrect-date-and-time-settings\"><strong>Fixing Incorrect Date and Time Settings:<\/strong><\/h2>\n\n\n<p>CentOS 7\/8 introduced the `<a href=\"https:\/\/www.commandlinux.com\/man-page\/man1\/timedatectl.1.html\" target=\"_blank\" rel=\"noopener\">timedatectl<\/a>` command. Check your system&#8217;s date and time settings and ensure they are correct for your time zone.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@nayana ~]# timedatectl\n               Local time: Mon 2023-10-09 01:13:43 EDT\n           Universal time: Mon 2023-10-09 05:13:43 UTC\n                 RTC time: Mon 2023-10-09 05:13:42\n                Time zone: America\/New_York (EDT, -0400)\nSystem clock synchronized: no\n              NTP service: active\n          RTC in local TZ: no\n\n<strong>Set to your timezone<\/strong><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@nayana ~]# timedatectl set-timezone \"Asia\/Kolkata\"\n&#91;root@nayana ~]# date\nMon Oct  9 10:45:19 IST 2023\n<\/code><\/pre>\n\n\n<h2 class=\"wp-block-heading\" id=\"clearing-oldexpired-dnf-cache\"><strong>Clearing Old\/Expired DNF Cache:<\/strong><\/h2>\n\n\n<p>Here is an <a href=\"https:\/\/dnf.readthedocs.io\/en\/latest\/command_ref.html#clean-command-label\" target=\"_blank\" rel=\"noopener\">article<\/a> to clean each kind of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Cache_(computing)\" target=\"_blank\" rel=\"noopener\">cache<\/a>. To clean all of it, run the below command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@nayana ~]# dnf clean all\n&#91;root@nayana ~]# rm -rf \/var\/cache\/dnf<\/code><\/pre>\n\n\n<h3 class=\"wp-block-heading\" id=\"changing-centos-baseurl-to-vaultcentosorg\"><strong>Changing CentOS BaseURL to vault.centos.org:<\/strong><\/h3>\n\n\n<p>CentOS Linux 8 was decommissioned on December 31, 2021. It means that the official CentOS project will no longer provide development resources for CentOS 8. If you need to update CentOS after December 31st, 2021, you must change the mirrors to <a href=\"https:\/\/vault.centos.org\/\" target=\"_blank\" rel=\"noopener\">vault.centos.org<\/a>, where they will be archived permanently. You could also upgrade to <a href=\"https:\/\/www.centos.org\/centos-stream\/\" target=\"_blank\" rel=\"noopener\">CentOS Stream<\/a> or migrate from CentOS to <a href=\"https:\/\/rockylinux.org\/\" target=\"_blank\" rel=\"noopener\">Rocky Linux<\/a>.<\/p>\n\n\n\n<p>   1. Navigate to the `\/etc\/yum.repos.d\/` directory:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@nayana ~]#\n cd \/etc\/yum.repos.d\/<\/code><\/pre>\n\n\n\n<p>   2. Modify the repository files using the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@nayana yum.repos.d]# sed -i 's\/mirrorlist\/#mirrorlist\/g' \/etc\/yum.repos.d\/CentOS-*\n&#91;root@nayana yum.repos.d]# sed -i 's|#baseurl=http:\/\/mirror.centos.org|baseurl=http:\/\/vault.centos.org|g' \/etc\/yum.repos.d\/CentOS-*<\/code><\/pre>\n\n\n\n<p>   3. Update your system:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@nayana yum.repos.d]# dnf update<\/code><\/pre>\n\n\n\n<p>Resolving the &#8220;Failed to synchronize cache for repo &#8216;appstream'&#8221; error in CentOS 8 is crucial to maintain a well-functioning system. By following these steps, you can troubleshoot the issue effectively. Remember to adapt these solutions to your specific environment, and stay updated with the latest CentOS news for any migration considerations.<\/p>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-uagb-call-to-action uagb-block-e8c26fab wp-block-button\"><div class=\"uagb-cta__wrap\"><h3 class=\"uagb-cta__title\">Stop Juggling Servers, Start Scaling Your Business<\/h3><p class=\"uagb-cta__desc\">Tired of the AWS learning curve? Let Veeble&#8217;s experts handle the heavy lifting of managing your AWS infrastructure so you can focus on what matters most \u2013 growing your business.<\/p><\/div><div class=\"uagb-cta__buttons\"><a href=\"https:\/\/www.veeble.com\/in\/managed-aws-hosting\/\" class=\"uagb-cta__button-link-wrapper wp-block-button__link\" target=\"_blank\" rel=\"noopener noreferrer\">Explore Managed AWS<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M504.3 273.6l-112.1 104c-6.992 6.484-17.18 8.218-25.94 4.406c-8.758-3.812-14.42-12.45-14.42-21.1L351.9 288H32C14.33 288 .0002 273.7 .0002 255.1S14.33 224 32 224h319.9l0-72c0-9.547 5.66-18.19 14.42-22c8.754-3.809 18.95-2.075 25.94 4.41l112.1 104C514.6 247.9 514.6 264.1 504.3 273.6z\"><\/path><\/svg><\/a><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The very recently I had encounterd the &#8220;Failed to synchronize cache for repo &#8216;appstream&#8216;&#8221; error in CentOS 8 which is frustrating, but it&#8217;s a [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":8599,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[5],"tags":[],"class_list":["post-1303","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"uagb_featured_image_src":{"full":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/10\/Troubleshooting-Failed-to-Synchronize-Cache-for-Repo-appstream-Error-in-CentOS-8.jpg",1366,768,false],"thumbnail":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/10\/Troubleshooting-Failed-to-Synchronize-Cache-for-Repo-appstream-Error-in-CentOS-8-150x150.jpg",150,150,true],"medium":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/10\/Troubleshooting-Failed-to-Synchronize-Cache-for-Repo-appstream-Error-in-CentOS-8-300x169.jpg",300,169,true],"medium_large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/10\/Troubleshooting-Failed-to-Synchronize-Cache-for-Repo-appstream-Error-in-CentOS-8-768x432.jpg",768,432,true],"large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/10\/Troubleshooting-Failed-to-Synchronize-Cache-for-Repo-appstream-Error-in-CentOS-8-1024x576.jpg",1024,576,true],"1536x1536":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/10\/Troubleshooting-Failed-to-Synchronize-Cache-for-Repo-appstream-Error-in-CentOS-8.jpg",1366,768,false],"2048x2048":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2023\/10\/Troubleshooting-Failed-to-Synchronize-Cache-for-Repo-appstream-Error-in-CentOS-8.jpg",1366,768,false]},"uagb_author_info":{"display_name":"Nayana Nair","author_link":"https:\/\/www.veeble.com\/kb\/author\/nayana\/"},"uagb_comment_info":0,"uagb_excerpt":"The very recently I had encounterd the &#8220;Failed to synchronize cache for repo &#8216;appstream&#8216;&#8221; error in CentOS 8 which is frustrating, but it&#8217;s a [&hellip;]","_links":{"self":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/1303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/comments?post=1303"}],"version-history":[{"count":8,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/1303\/revisions"}],"predecessor-version":[{"id":7290,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/1303\/revisions\/7290"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media\/8599"}],"wp:attachment":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media?parent=1303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/categories?post=1303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/tags?post=1303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}