PPA installed driver 396.24 is causing CUDA 9.2 installation error

During installation of CUDA 9.2 on my Ubuntu 18.04 desktop machine it reports an error on finding the already installed driver 396.24 I got from PPA. It is trying to install driver 396.26. How can I get rid of the 396.24? I have tried several times using various syntaxes of remove or purge, but I’m obviously not expert enough to get it right.

This is the text of the error message:

Unpacking nvidia-396 (396.26-0ubuntu1) ...
dpkg: error processing archive /var/cuda-repo-9-2-local/./nvidia-396_396.26-0ubuntu1_amd64.deb (--unpack):
 trying to overwrite '/lib/udev/rules.d/71-nvidia.rules', which is also in package nvidia-kernel-common-396 396.24-0ubuntu0~gpu18.04.1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cuda-repo-9-2-local/./nvidia-396_396.26-0ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

i had the same error on pop!os 18.04
one Alexadre Goddard just posted this on askubuntu, i’m about to try it:
(I believe this assumes you have installed 396.24 from the ppa)

Fix the broken package

sudo dpkg -i --force-overwrite /var/cuda-repo-9-2-local/./nvidia-396_396.26-0ubuntu1_amd64.deb

Reinstall the whole thing while passing the --force-overwrite option to the underlying Dpkg when running the install command (based on *****[this answer])

sudo apt-get -o Dpkg::Options::="--force-overwrite" install cuda

*****[this answer] refers to:
https://askubuntu.com/questions/56761/force-apt-get-to-overwrite-file-installed-by-another-package