After upgrading Ubuntu 10.04 to 10.10 I encountered the following error, which prevented me from removing the fglrx package: “dpkg-divert: mismatch on package”. Read on for a solution. Dpkg maintains a list of diverted files. To see it, enter the following: dpkg-divert --list In my case, fglrx wanted to remove files from xorg-driver-fglrx called /usr/lib/libGL.so.1.2 and /usr/lib32/libGL.so.1.2. So what I had to do was: dpkg-divert --remove /usr/lib/libGL.so.1.2 dpkg-divert --remove /usr/lib32/libGL.