This also affects me and was super difficult to figure out. It took me about 2 hours to figure out the slow apt operations had to do with systemd, then figure out how to trace systemd appropriately to follow through (I used 'sudo strace --summary --summary-wall-clock --timestamps --follow-forks -p 1', where 1 is the systemd init PID) and then finally being fast enough to see that the PID it's waiting on is '/usr/lib/systemd/system-generators/netplan /run/systemd/generator /run/systemd/generator.early /run/systemd/generator.late', which finally led me to this bug report. In my case it was a custom udev rule for 'mixxx' that was trying to reference a non-existing group.
This also affects me and was super difficult to figure out. It took me about 2 hours to figure out the slow apt operations had to do with systemd, then figure out how to trace systemd appropriately to follow through (I used 'sudo strace --summary --summary- wall-clock --timestamps --follow-forks -p 1', where 1 is the systemd init PID) and then finally being fast enough to see that the PID it's waiting on is '/usr/lib/ systemd/ system- generators/ netplan /run/systemd/ generator /run/systemd/ generator. early /run/systemd/ generator. late', which finally led me to this bug report. In my case it was a custom udev rule for 'mixxx' that was trying to reference a non-existing group.
I filed an issue on the ubuntu bugtracker: https:/ /bugs.launchpad .net/ubuntu/ +source/ netplan. io/+bug/ 2069495 to get this fixed.