Public bug reported:
Uninstall fails on error from scripts unique to package.
$ sudo apt install emacs-nox
$ sudo apt purge emacs-nox
...
Removing emacs-nox (1:27.1+1-3ubuntu5.1) ...
update-alternatives: alternative /usr/bin/emacs for editor not registered; not
removing
update-alternatives: alte
This bug is still present in 1.30. I fixed it the same way as
mfisheresq, before finding this report.
## Bug Fix
The sgml-base package should create the /var/lib/sgml-base directory, and not
even need to check whether it exists.
$ sudo dpkg --configure sgml-base
Setting up sgml-base (1.30) ...