In Ubuntu 25.04 why cannot this terminal line-option be hidden or removed if I do not which to use it.
Gort
In Ubuntu 25.04 why cannot this terminal line-option be hidden or removed if I do not which to use it.
Gort
The notice âSome sources can be modernized. Run âapt modernize-sourcesâ to do soâ appears because your Ubuntu system has detected software repository configurations using the older, traditional format (.list
files, typically /etc/apt/sources.list
and files in /etc/apt/sources.list.d/
).
Ubuntu (and Debian) are transitioning to a newer, more structured format called âdeb822â using .sources
files (usually placed in /etc/apt/sources.list.d/
). This format is generally considered more readable, less prone to certain types of errors, and easier for tools to parse.
The apt modernize-sources
command is a helper tool provided to automatically convert your existing .list
files into the new .sources
format.
There isnât a specific configuration option within apt
designed solely to turn off only this modernization notice while keeping the old .list
files active. The notice is there specifically because the condition (presence of .list
files) exists.
Therefore, the primary ways to stop seeing the notice are:
Run the Modernization Command (Recommended):
sudo apt modernize-sources
will analyze your existing .list
files and attempt to convert them into the new .sources
format..bak
extension or similar)..list
files are no longer the primary configuration (they might be commented out or removed by the tool), apt
will no longer detect sources needing modernization, and the notice will disappear./etc/apt/sources.list
file and the contents of the /etc/apt/sources.list.d/
directory, just in case something unexpected happens during the conversion.sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
sudo cp -R /etc/apt/sources.list.d/ /etc/apt/sources.list.d.backup
Then run the modernization:sudo apt modernize-sources
After running it, test with sudo apt update
to ensure everything still works correctly.Use Quiet Flags (Not Ideal for Suppressing Just This):
-q
or -qq
with apt
commands (e.g., sudo apt -q update
).The best and intended way to âsuppressâ the notice is to address the underlying reason itâs appearing: run sudo apt modernize-sources
to convert your repository configuration files to the newer format. While you can technically ignore the notice and continue using the .list
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.
@popey Itâs good to see back postingâŠFeed the AddictionâŠ
|### Henry Wyatt hwyattjr100@gmail.com|3:57 PM (0 minutes ago)||
|
| â | â | â |
|to Rick
|
I used it previously and some sources are not compatible, which kept listing these sources every time I run apt update. The modernize line is only one line, but the incompatible sources list was multiple lines and bugged the hell out of me so I did a fresh install and did not run the modernize command anymore.
Based on your idea the âQuiet Flagsâ would not be safe for me. It might even make me âQuietâ
Gort