If you're a sucker like me and installed usbguard on a Ubuntu variant you may find that you will have access to none of your usb devices at all, because F you. The installer automatically sets up the daemon which has no rules so will just block all of your devices. Doing a basic apt remove usbguard
may fail at 25%, because also F you.
My kernel is version 4.15.0-47-generic, not sure if this stopped working at some point or what.
sudo echo "allow id *:*" > /etc/usbguard/rules.conf
sudo sed -i 's/PresentDevicePolicy=apply-policy/PresentDevicePolicy=allow/' /etc/usbguard/usbguard-daemon.conf
sudo reboot
Reboot may hang at stopping usbguard, again, because F you. Power off or wait. You'll hopefully have access to your devices when your machine comes back up.
sudo systemctl stop usbguard.service
sudo systemctl disable usbguard.service
sudo systemctl stop usbguard-dbus.service
sudo systemctl disable usbguard-dbus.service
sudo apt remove usbguard -y
sudo apt purge usbguard -y
sudo rm -rf /etc/usbguard/
I had issues until I rebooted for whatever reason.
sudo reboot
Now you're free!
I had to chroot into the installation from a live installation running off a USB stick and then follow your instructions !! What a pain!!
I used the instructions here to figure out how to chroot:
https://superuser.com/questions/111152/whats-the-proper-way-to-prepare-chroot-to-recover-a-broken-linux-installation