Make `apt` shut up about "modernize-sources" in Trixie
Apt in Trixie (Debian 13) has the annoying function to tell you
"Notice: Some sources can be modernized. Run 'apt modernize-sources' to do so." ... every single time you run apt update. Not cool for logs and log monitoring.
And - of course - if you had the option to do this, you ... would have run the indicated apt modernize-sources command to convert your sources.list to "deb822 .sources format" files already. So an information message once or twice would have done.
Well, luckily you can help yourself:
apt -o APT::Get::Update::SourceListWarnings=false will keep apt shut up. This could go into an alias or your systems management tool / update script.
Alternatively add
# Keep apt shut about preferring the "deb822" sources file format APT::Get::Update::SourceListWarnings "false";
to /etc/apt/apt.conf.d/10quellsourceformatwarnings .
This silences the notices about sources file formats (not only the deb822 one) system-wide. That way you can decide when you can / want to migrate to the new, more verbose, apt sources format yourself.
Update 06.06.2025
I looks like the powers that are have had mercy, apt 3.0.2 has migrated to Trixie two days ago and the Changelog contains:
Downgrade "modernize-sources" notice to audit
![]()
Comments
Display comments as Linear | Threaded
Klaus Kannegießer on :
Thank you so much Daniel! You made a whole IT department happy to get rid of that annoyance from our logstash. I owe you a beer. And other beers already.
Ben Aliobert on :
OMG, thank you! I checked the man page and --help but could not find how to disable this shit. I sometimes wonder what people spend their development time on. "I have developed this amazing feature and nobody sees my ingenuity .... I will bug them to death to realize how great ~~it is~~ I am". Delusional.
Klaus Kannegießer on :
Amazing, thank you so much!
I think a small nod would have been appropriate at
https://salsa.debian.org/apt-team/apt/-/commit/7833214bf46732d09967235577d2235a0faf18c3
But from us, the beer offer stands!
Marcos Alano on :
It seems for some reason this change wasn't carried out to branch 3.1. I'm running APT 3.1.2 from Ubuntu Questing and I still get a notice about it.
Alan on :
For apt-3.x, changing to the format below disabled the warning from APT::Get::Update::SourceListWarnings "false"; to APT::Get::Update::SourceListWarnings "0";