If you are hit by this issue, it seems sufficient to simply ask dpkg to finish configuration as it seems the prerm script isn't retried
$ dpkg --configure -a
Or you can just re-run your upgrade command (e.g. "apt upgrade") which should do the same plus finish any upgrades that didn't finish (which may be the case) - you'll probably want to do that either way.
If you are hit by this issue, it seems sufficient to simply ask dpkg to finish configuration as it seems the prerm script isn't retried
$ dpkg --configure -a
Or you can just re-run your upgrade command (e.g. "apt upgrade") which should do the same plus finish any upgrades that didn't finish (which may be the case) - you'll probably want to do that either way.