Here is MY answer on how to DISABLE Netplan without uninstalling it (tested for Ubuntu 20.04.2 LTS Server and Desktop):
The solution is based on my own investigations. I do not know, if this is an official way to do it, though it is pretty much systemd like.
Netplan is executed during system boot by a systemd generator file
/usr/lib/systemd/system-generators/. This is a symlink pointing to
/usr/lib/netplan/generate. So you just have to remove it, to keep Netplan from beeing executed at boot:
sudo rm /usr/lib/systemd/system-generators/netplan
Reboot your system and you will not have any configurations generated by Netplan available inside
Stop Netplan from running while system is up:
sudo chmod a-x /usr/sbin/netplan
sudo ln -s /usr/lib/netplan/generate /usr/lib/systemd/system-generators/netplan
Reboot your system and Netplan will be executed during system boot and will generate back-end configurations inside
/run/... again, if yaml-files are present in one of the Netplan configuration directories.
Make Netplan executable again, while system is running:
sudo chmod a+x /usr/sbin/netplan
This is all you need to do! There is no need for adding/removing
netcfg/do_not_use_netplan=True to your
/etc/default/grub in addition to the two commands above.
So far I could not find anything usefull that is done by
netcfg/do_not_use_netplan=True. I don't and can't say that it might not do something, but I could not reproduce, that it would do something (I would expect it to do).
I can for sure say, that it does NOT stop Netplan from beeing executed at boot time. Without disabling Netplan like described above, add
debug to your
/etc/default/grub so that it looks like follows,
to verify yourself.
After system boot execute
dmesg | grep netplan
and you will get something like the following:
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.4.0-74-generic root=UUID=74a27c05-a0a8-4a7c-a757-5edda35a5933 ro debug netcfg/do_not_use_netplan=True debian-installer/language=de keyboard-configuration/layoutcode?=de
[ 0.037275] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.4.0-74-generic root=UUID=74a27c05-a0a8-4a7c-a757-5edda35a5933 ro debug netcfg/do_not_use_netplan=True debian-installer/language=de keyboard-configuration/layoutcode?=de
[ 3.086458] systemd: /usr/lib/systemd/system-generators/netplan succeeded.
[ 3.397282] systemd: unit_file_build_name_map: normal unit file: /run/systemd/system/netplan-ovs-cleanup.service
Like you can see, the command line is read correctly, but Netplan is still executed.
So I thought it because it reads "do_not_use_netplan" it would may still execute Netplan, but would not use the back-end configuration, once a valid configuration with ifupdown
/etc/network/interfaces does exist.
But NO, even if ifupdown is installed and a valid configuration is placed inside
/etc/network/interfaces Netplan does still generate back-end configurations and applies them and configurations from ifupdown are still ignored.
Only if I do disable Netplan like described at the beginning, the ifupdown configuration will be used and will start working like expected.