Disable CUPS Browsed

Running 22.04
Modified cups-browsed-config and added BrowseRemoteProtocols none to the file.
then executed these commands
sudo systemctl stop cups-browsed
sudo systemctl disable cups-browsed

However, network printer still being added.
What am I doing wrong?

I suspect the avahi daemon might be coming into play here but i have no knowledge how to specifically target network printers.

Found this:

In /etc/cups/cups-browsed.conf, set directive:

BrowseProtocols none

Afterwards, run service cups-browsed restart and service cups restart. There should be no printers visible, except those you’ve added yourself.

Found this if it is avahi related:

As mentioned earlier, this is now done in the client-side cups libraries (ie libcups.so, which GNOME and KDE apps link against) and not in the cupsd server. So changing the “Browse” settings in the cups server won’t work.

$ ldd /usr/lib/x86_64-linux-gnu/libcups.so.2
libavahi-common.so.3 => /usr/lib/x86_64-linux-gnu/libavahi-common.so.3
libavahi-client.so.3 => /usr/lib/x86_64-linux-gnu/libavahi-client.so.3

IE this behaviour (of showing remote printers in the Print dialog box) happens even if you turn off your local cups server. You can disable it by turning off the avahi service, but that will disable all zeroconf/mdns related functionality.

However, there is at least a way to turn off most of avahi’s functionality (including adding remote printers into the CUPS clients) while keeping the DNS functionality (eg when looking up foo.local-style host names):

edit /etc/avahi/avahi-daemon.conf and in the [server] section, add enable-dbus=no then restart the avahi-daemon service.

This fixed the problem but created several others, so had to revert.

I believe the avahi-daemon uses IPP to search and add printers for driverless print queues. If you do not use airprint or mopria to print from mobile devices to your printer you can try disbaling the IPP protocal on your printer so that the OS does not see it and add it. That is the only other thing I can think of.

In my case I disbaled AirPrint/Bonjour only on my Canon printer since I print via android mobile devices which uses Mopria and on my Ubuntu Budgie install which is 22.10 it stooped adding my Canon printer.