1

Today I had run an update to my Ubuntu 14.10 installation, and after it I get some errors about the nvidia-331 driver so I wanted to remove it and reinstall it, every time to do so the apt-get purge nvidia-331 fail and i got this error

devh@devh-PC:~$ sudo apt-get -y purge nvidia-331
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-generic linux-image-generic thermald
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  nvidia-331
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 184 MB disk space will be freed.
(Reading database ... 243902 files and directories currently installed.)
Removing nvidia-331 (331.113-0ubuntu0.1) ...
stop: Unknown job: nvidia-persistenced
userdel: user nvidia-persistenced is currently used by process 1612
dpkg: error processing package nvidia-331 (--remove):
 subprocess installed post-removal script returned error exit status 8
Errors were encountered while processing:
 nvidia-331
E: Sub-process /usr/bin/dpkg returned an error code (1)

I get the same error when i try to install any other package.

Tim
  • 32,861
  • 27
  • 118
  • 178

1 Answers1

0

I see that you have already solved your issue. This is just for others searching for answers to their similar problem in a proper answer form.

I have had this same issue when playing around with drivers. To solve it, I did the following:

  1. Open a terminal

  2. Run sudo apt-get purge nvidia-331. This wont't work, but take note of the process id it mentions when it complains:

    userdel: user nvidia-persistenced is currently used by process 1612

  3. Run sudo kill [process_id] to kill the process mentioned above. Note that your process id will most certainly differ, don't use the one above!

  4. Then re-run sudo apt-get purge nvidia-331

It should now work.

ollpu
  • 259
  • 1
  • 2
  • 12