I've had this occur on another system, and this time I could debug it a little more freely. This is an interesting output:
# dpkg --purge --simulate systemd
dpkg: dependency problems prevent removal of systemd:
snapd depends on systemd (>= 204-5ubuntu20.20); however:
Package systemd is to be removed.
dpkg: error processing package systemd (--purge):
dependency problems - not removing
Errors were encountered while processing:
systemd
Now, why snapd was installed I'm not sure, but I guess that's what installed systemd, since the snapd package depends on systemd.
I've had this occur on another system, and this time I could debug it a little more freely. This is an interesting output:
# dpkg --purge --simulate systemd
dpkg: dependency problems prevent removal of systemd:
snapd depends on systemd (>= 204-5ubuntu20.20); however:
Package systemd is to be removed.
dpkg: error processing package systemd (--purge):
dependency problems - not removing
Errors were encountered while processing:
systemd
Now, why snapd was installed I'm not sure, but I guess that's what installed systemd, since the snapd package depends on systemd.