I came across a similar error trying to downgrade from nvidia-331 to nvidia-304 or trying to remove nvidia-331-updates while logged in to the desktop.
Removing nvidia-331-updates (331.89-0ubuntu5) ... stop: Unknown instance: userdel: user nvidia-persistenced is currently used by process 1665 dpkg: error processing package nvidia-331-updates (--remove): subprocess installed post-removal script returned error exit status 8 Errors were encountered while processing: nvidia-331-updates Rebooting and instead of logging in to the desktop, but pressing Ctrl- Alt-F1 for a tty terminal, then logging in, allowed me to remove the 331 driver. ** Also affects: nvidia-graphics-drivers-331-updates (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1369398 Title: package nvidia-331 331.89-0ubuntu4 failed to install/upgrade: subprocess installed post-removal script returned error exit status 8 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-331/+bug/1369398/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs