Cannot remove nvidia package because of No diversion ‘diversion ?

Oct 1st, 2012 | By | Category: Linux / Freebsd

Got this error today:

Fetched 1,845 kB in 2s (853 kB/s)
(Reading database … 213548 files and directories currently installed.)
Removing libgl1-nvidia-alternatives …
No diversion ‘diversion of /usr/lib/ to /usr/lib/nvidia/diversions/ by libgl1-nvidia-alternatives’, none removed.
Removing ‘diversion of /usr/lib/ to /usr/lib/nvidia/diversions/ by libgl1-nvidia-alternatives’
dpkg-divert: rename involves overwriting `/usr/lib/′ with
different file `/usr/lib/nvidia/diversions/′, not allowed
dpkg: error processing libgl1-nvidia-alternatives (–remove):
subprocess installed post-removal script returned error exit status 2
configured to not write apport reports
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)


Good times as it was preventing compiz or anythign else from being installed.. Quick fix to this was to just manually delete the entire /usr/lib/nvidia directory.. problem solved

Leave a Comment