{"id":13841,"date":"2025-08-12T18:49:00","date_gmt":"2025-08-12T16:49:00","guid":{"rendered":"https:\/\/monodes.com\/predaelli\/?p=13841"},"modified":"2025-08-13T07:27:37","modified_gmt":"2025-08-13T05:27:37","slug":"some-sources-can-be-modernized-run-apt-modernize-sources-to-do-so","status":"publish","type":"post","link":"https:\/\/monodes.com\/predaelli\/2025\/08\/12\/some-sources-can-be-modernized-run-apt-modernize-sources-to-do-so\/","title":{"rendered":"Some sources can be modernized. Run \u2018apt modernize-sources\u2019 to do so"},"content":{"rendered":"\n<p>Thanks to <a href=\"https:\/\/popey.me\/\">Alan Pope<\/a> that explained so clearly the Run \u2018apt modernize-sources\u2019 to do so issue at <a href=\"https:\/\/discourse.ubuntu.com\/t\/notice-some-sources-can-be-modernized-run-apt-modernize-sources-to-do-so\/59369\">discourse.ubuntu.com<\/a>:<\/p>\n\n\n\n<!--more-->\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>The notice \u201cSome sources can be modernized. Run \u2018apt modernize-sources\u2019 to do so\u201d appears because your Ubuntu system has detected software repository configurations using the older, traditional format (<code class=\"\" data-line=\"\">.list<\/code> files, typically <code class=\"\" data-line=\"\">\/etc\/apt\/sources.list<\/code> and files in <code class=\"\" data-line=\"\">\/etc\/apt\/sources.list.d\/<\/code>).<\/p>\n\n\n\n<p>Ubuntu (and Debian) are transitioning to a newer, more structured format called \u201cdeb822\u201d using <code class=\"\" data-line=\"\">.sources<\/code> files (usually placed in <code class=\"\" data-line=\"\">\/etc\/apt\/sources.list.d\/<\/code>). This format is generally considered more readable, less prone to certain types of errors, and easier for tools to parse.<\/p>\n\n\n\n<p>The <code class=\"\" data-line=\"\">apt modernize-sources<\/code> command is a helper tool provided to automatically convert your existing <code class=\"\" data-line=\"\">.list<\/code> files into the new <code class=\"\" data-line=\"\">.sources<\/code> format.<\/p>\n\n\n\n<p>There isn\u2019t a specific configuration option within <code class=\"\" data-line=\"\">apt<\/code> designed <em>solely<\/em> to turn off <em>only<\/em> this modernization notice while keeping the old <code class=\"\" data-line=\"\">.list<\/code> files active. The notice is there specifically because the condition (presence of <code class=\"\" data-line=\"\">.list<\/code> files) exists.<\/p>\n\n\n\n<p>Therefore, the primary ways to stop seeing the notice are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Run the Modernization Command (Recommended):<\/strong>\n<ul class=\"wp-block-list\">\n<li>This is the intended solution. Running <code class=\"\" data-line=\"\">sudo apt modernize-sources<\/code> will analyze your existing <code class=\"\" data-line=\"\">.list<\/code> files and attempt to convert them into the new <code class=\"\" data-line=\"\">.sources<\/code> format.<\/li>\n\n\n\n<li>It typically backs up your old configuration files before making changes (e.g., adding a <code class=\"\" data-line=\"\">.bak<\/code> extension or similar).<\/li>\n\n\n\n<li>Once your sources are successfully converted and the old <code class=\"\" data-line=\"\">.list<\/code> files are no longer the primary configuration (they might be commented out or removed by the tool), <code class=\"\" data-line=\"\">apt<\/code> will no longer detect sources needing modernization, and the notice will disappear.<\/li>\n\n\n\n<li><strong>Before running:<\/strong> It\u2019s always wise to manually back up your <code class=\"\" data-line=\"\">\/etc\/apt\/sources.list<\/code> file and the contents of the <code class=\"\" data-line=\"\">\/etc\/apt\/sources.list.d\/<\/code> directory, just in case something unexpected happens during the conversion.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\" data-line=\"\">sudo cp \/etc\/apt\/sources.list \/etc\/apt\/sources.list.backup\nsudo cp -R \/etc\/apt\/sources.list.d\/ \/etc\/apt\/sources.list.d.backup\n<\/code><\/pre>\n\n\n\n<p>Then run the modernization:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt modernize-sources<\/pre>\n\n\n\n<p>After running it, test with <code class=\"\" data-line=\"\">sudo apt update<\/code> to ensure everything still works correctly.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use Quiet Flags (Not Ideal for Suppressing <em>Just<\/em> This):<\/strong><\/li>\n<\/ul>\n\n\n\n<p>The best and intended way to \u201csuppress\u201d the notice is to address the underlying reason it\u2019s appearing: run <code class=\"\" data-line=\"\">sudo apt modernize-sources<\/code> to convert your repository configuration files to the newer format. While you <em>can<\/em> technically ignore the notice and continue using the <code class=\"\" data-line=\"\">.list<\/code> files (they still work), the notice will likely persist until you modernize or use general quiet flags that hide other output too. Modernizing is generally safe and aligns with the direction the distribution is heading.<\/p>\n<\/blockquote>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">Thanks to Alan Pope that explained so clearly the Run \u2018apt modernize-sources\u2019 to do so issue at discourse.ubuntu.com:<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/monodes.com\/predaelli\/2025\/08\/12\/some-sources-can-be-modernized-run-apt-modernize-sources-to-do-so\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"federated","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[73,278,117],"tags":[],"class_list":["post-13841","post","type-post","status-publish","format-standard","hentry","category-debian","category-tricks","category-ubuntu"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6daft-3Bf","jetpack-related-posts":[{"id":10343,"url":"https:\/\/monodes.com\/predaelli\/2023\/04\/01\/debian-programs-from-stable-testing-unstable-and-even-experimental-without-trauma\/","url_meta":{"origin":13841,"position":0},"title":"Debian: programs from stable, testing, unstable and even experimental without trauma","author":"Paolo Redaelli","date":"2023-04-01","format":false,"excerpt":"I originally wrote this in Italian but I think that it may be more useful translated into English In daily use of computers it often happens that you need a stable base and at the same time use recent, very recent or even 'beta\/alpha\/experimental' versions of some specific programs. Debian\u2026","rel":"","context":"In &quot;Debian&quot;","block_context":{"text":"Debian","link":"https:\/\/monodes.com\/predaelli\/category\/debian\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9656,"url":"https:\/\/monodes.com\/predaelli\/2022\/09\/25\/fix-missing-gpg-key-apt-repository-errors-no_pubkey\/","url_meta":{"origin":13841,"position":1},"title":"Fix Missing GPG Key Apt Repository Errors (NO_PUBKEY)","author":"Paolo Redaelli","date":"2022-09-25","format":false,"excerpt":"You might see a missing public GPG key error (\"NO_PUBKEY\") on Debian, Ubuntu or Linux Mint when running apt update \/ apt-get update. This can happen when you add a repository, and you forget to add its public key, or maybe there was a temporary key server error when trying\u2026","rel":"","context":"In &quot;Debian&quot;","block_context":{"text":"Debian","link":"https:\/\/monodes.com\/predaelli\/category\/debian\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3717,"url":"https:\/\/monodes.com\/predaelli\/2018\/01\/28\/how-to-install-skype-for-linux-beta-on-debian-9-stretch-linuxbabe-com\/","url_meta":{"origin":13841,"position":2},"title":"How to Install Skype for Linux Beta on Debian 9 Stretch &#8211; LinuxBabe.Com","author":"Paolo Redaelli","date":"2018-01-28","format":false,"excerpt":"How to Install Skype for Linux Beta on Debian 9 Stretch - LinuxBabe.Com Skype for Linux beta 5.3 was released on May 31, 2017. It is a proprietary software, built on the web-based Skype client. This tutorial is going to show you how to install Skype on Debian 9 Stretch\u2026","rel":"","context":"In &quot;Debian&quot;","block_context":{"text":"Debian","link":"https:\/\/monodes.com\/predaelli\/category\/debian\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6401,"url":"https:\/\/monodes.com\/predaelli\/2020\/02\/23\/debian-programmi-da-stable-testing-unstable-ed-anche-experimental-senza-traumi\/","url_meta":{"origin":13841,"position":3},"title":"Debian: programmi da stable, testing, unstable ed anche experimental senza traumi","author":"Paolo Redaelli","date":"2020-02-23","format":false,"excerpt":"Nell'uso quotidiano dei computer capita spesso di avere la necessit\u00e0 di una base stabile ed allo stesso tempo di utilizzare versioni recenti, molto recenti o anche \"beta\/alpha\/sperimentali\" di alcuni specifici programmi. Gli utenti di Debian e quindi di tutte le derivate a partire da Ubuntu non sono da meno, anzi!\u2026","rel":"","context":"In &quot;Debian&quot;","block_context":{"text":"Debian","link":"https:\/\/monodes.com\/predaelli\/category\/debian\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2020\/02\/system-software-install.png?fit=256%2C256&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1254,"url":"https:\/\/monodes.com\/predaelli\/2016\/04\/06\/aptyum-cheatlist\/","url_meta":{"origin":13841,"position":4},"title":"apt\/yum cheatlist","author":"Paolo Redaelli","date":"2016-04-06","format":false,"excerpt":"apt-cache se I'm actually doing the reverse: SwitchingToUbuntu\/FromLinux\/RedHatEnterpriseLinuxAndFedora\u00a0 but it's easy as a quick Ctrl-F or \/ Table of Equivalent Commands Below is a table of equivalent commands for package management on both Ubuntu\/Debian and Red Hat\/Fedora systems. Task Red Hat\/Fedora Ubuntu Adding, Removing and Upgrading Packages Refresh list of\u2026","rel":"","context":"In &quot;Debian&quot;","block_context":{"text":"Debian","link":"https:\/\/monodes.com\/predaelli\/category\/debian\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":805,"url":"https:\/\/monodes.com\/predaelli\/2015\/11\/22\/upgrades\/","url_meta":{"origin":13841,"position":5},"title":"Upgrades","author":"Paolo Redaelli","date":"2015-11-22","format":false,"excerpt":"Upgrading oldish releases are a pain. I tried \"official\" ways to upgrade my Saucy Salamander Eeepc. No way. I got to do it the hard way, treating that Ubuntu like the Debian it is underneath. A power blow of apt-fu: %s\/saucy\/wily\/gc :wq apt-get update && apt-get dist-upgrade Now, that's taking\u2026","rel":"","context":"In &quot;Mood&quot;","block_context":{"text":"Mood","link":"https:\/\/monodes.com\/predaelli\/category\/mood\/"},"img":{"alt_text":"eeepc-and-beer","src":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2015\/11\/eeepc-and-beer-300x210.jpg?resize=350%2C200","width":350,"height":200},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/13841","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/comments?post=13841"}],"version-history":[{"count":0,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/13841\/revisions"}],"wp:attachment":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media?parent=13841"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/categories?post=13841"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/tags?post=13841"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}