I have a PC with WSL2/Ubuntu 20.04. I recently tried installing a package on it (the Dell srvadmin package). The installation fell over half way through as WSL2 doesn't have systemd on it.
This has left the package in a half-installed/broken status and I can't remove/purge etc. it with wither dpkg or apt e.g.
tim@DESKTOP-Q35QTRS:~/interlocutor$ sudo dpkg -r --force-all srvadmin-hapi
(Reading database ... 54160 files and directories currently installed.)
Removing srvadmin-hapi (9.3.2) ...
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
dpkg: error processing package srvadmin-hapi (--remove):
installed srvadmin-hapi package pre-removal script subprocess returned error exit status 1
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
dpkg: error while cleaning up:
installed srvadmin-hapi package post-installation script subprocess returned error exit status 1
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Errors were encountered while processing:
srvadmin-hapi
tim@DESKTOP-Q35QTRS:~/interlocutor$
So is it possible for me to manually do the steps that dpkg is failing to do or otherwise somehow remove the broken package?