Problems installing CUDA 10.1 on my computer

Please remove cuda-7.5:
sudo apt remove nvidia-cuda*

Thanks. But it didn’t work.

sudo apt remove nvidia-cuda*
[sudo] password for whaler:
Reading package lists… Done
Building dependency tree
Reading state information… Done
Note, selecting ‘nvidia-cuda-toolkit’ for glob ‘nvidia-cuda*’
Note, selecting ‘nvidia-cuda-dev’ for glob ‘nvidia-cuda*’
Note, selecting ‘nvidia-cuda-doc’ for glob ‘nvidia-cuda*’
Note, selecting ‘nvidia-cuda-gdb’ for glob ‘nvidia-cuda*’
You might want to run ‘apt-get -f install’ to correct these:
The following packages have unmet dependencies:
cuda-libraries-dev-10-1 : Depends: libcublas-dev (>= 10.2.0.168) but it is not going to be installed
cuda-samples-10-1 : Depends: libcublas-dev (>= 10.2.0.168) but it is not going to be installed
cuda-visual-tools-10-1 : Depends: libcublas-dev (>= 10.2.0.168) but it is not going to be installed
E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).

Then I did this

sudo apt-get -f install
[sudo] password for whaler:
Reading package lists… Done
Building dependency tree
Reading state information… Done
Correcting dependencies… Done
The following packages were automatically installed and are no longer required:
cuda-command-line-tools-10-1 cuda-compiler-10-1 cuda-cudart-10-1
cuda-cudart-dev-10-1 cuda-cufft-10-1 cuda-cufft-dev-10-1 cuda-cuobjdump-10-1
cuda-cupti-10-1 cuda-curand-10-1 cuda-curand-dev-10-1 cuda-cusolver-10-1
cuda-cusolver-dev-10-1 cuda-cusparse-10-1 cuda-cusparse-dev-10-1
cuda-documentation-10-1 cuda-driver-dev-10-1 cuda-gdb-10-1
cuda-gpu-library-advisor-10-1 cuda-libraries-10-1 cuda-libraries-dev-10-1
cuda-license-10-1 cuda-memcheck-10-1 cuda-misc-headers-10-1 cuda-npp-10-1
cuda-npp-dev-10-1 cuda-nsight-10-1 cuda-nsight-compute-10-1
cuda-nsight-systems-10-1 cuda-nvcc-10-1 cuda-nvdisasm-10-1 cuda-nvgraph-10-1
cuda-nvgraph-dev-10-1 cuda-nvjpeg-10-1 cuda-nvjpeg-dev-10-1
cuda-nvml-dev-10-1 cuda-nvprof-10-1 cuda-nvprune-10-1 cuda-nvrtc-10-1
cuda-nvrtc-dev-10-1 cuda-nvtx-10-1 cuda-nvvp-10-1 cuda-samples-10-1
cuda-sanitizer-api-10-1 cuda-toolkit-10-1 cuda-tools-10-1
cuda-visual-tools-10-1 libcublas-dev libcublas10
Use ‘sudo apt autoremove’ to remove them.
The following additional packages will be installed:
libcublas-dev
The following NEW packages will be installed:
libcublas-dev
0 upgraded, 1 newly installed, 0 to remove and 9 not upgraded.
6 not fully installed or removed.
Need to get 0 B/39.1 MB of archives.
After this operation, 112 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 file:/var/cuda-repo-10-1-local-10.1.168-418.67 libcublas-dev 10.2.0.168-1 [39.1 MB]
(Reading database … 265349 files and directories currently installed.)
Preparing to unpack …/libcublas-dev_10.2.0.168-1_amd64.deb …
Unpacking libcublas-dev (10.2.0.168-1) …
dpkg: error processing archive /var/cuda-repo-10-1-local-10.1.168-418.67/./libcublas-dev_10.2.0.168-1_amd64.deb (–unpack):
trying to overwrite ‘/usr/lib/x86_64-linux-gnu/libcublas_static.a’, which is also in package nvidia-cuda-dev 7.5.18-0ubuntu1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cuda-repo-10-1-local-10.1.168-418.67/./libcublas-dev_10.2.0.168-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Try removing the inclompletely installed cuda 10:
sudo apt remove cuda* nvidia-cuda*

sudo apt remove cuda* nvidia-cuda*
[sudo] password for whaler:
Reading package lists… Done
Building dependency tree
Reading state information… Done
Note, selecting ‘cuda-libraries-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-cross-aarch64-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-gpu-library-advisor-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cross-aarch64’ for glob ‘cuda*’
Note, selecting ‘cuda-command-line-tools-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvprune-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-visual-tools-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-driver-dev-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-command-line-tools-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-cross-armhf-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-visual-tools-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-driver-dev-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-nvgraph-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-driver-cross-armhf-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-runtime-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-runtime-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-cross-armhf-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-gdb-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-visual-tools-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cupti-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-dev-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-cross-ppc64el-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-libraries-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-dev-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1204’ for glob ‘cuda*’
Note, selecting ‘cuda-nvjpeg-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvrtc-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvml-cross-ppc64el-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-minimal-build-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-drivers’ for glob ‘cuda*’
Note, selecting ‘cuda-cuobjdump-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-nvgraph-dev-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1404’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1410’ for glob ‘cuda*’
Note, selecting ‘cuda-nvml-cross-aarch64-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvgraph-dev-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1504’ for glob ‘cuda*’
Note, selecting ‘cuda-nvgraph-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-dev-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1604’ for glob ‘cuda*’
Note, selecting ‘cuda-license-7-5’ for glob ‘cuda*’
Note, selecting ‘cuda-nvgraph-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-libraries-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-dev-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-cross-armhf-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-runtime-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-license-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-demo-suite-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-license-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-demo-suite-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-dev-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-cross-aarch64-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvrtc-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-dev-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-nvjpeg-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-samples-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cublas-cross-ppc64el-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nsight-systems-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-samples-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cublas-cross-aarch64-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-gdb-src-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1604-8-0-local’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-gdb-src-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-tools-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvtx-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-cross-aarch64-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvrtc-cross-aarch64-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-license-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvdisasm-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-samples-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-core-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-documentation-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-nvdisasm-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-core-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-compat-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-minimal-build-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-cross-ppc64el-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-dev-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-dev-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-minimal-build-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-cross-ppc64el-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-dev-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-dev-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-nvcc-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1404-7-5-local’ for glob ‘cuda*’
Note, selecting ‘cuda-nvvp-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvvp-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-tools-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-driver-cross-ppc64el-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-cross-armhf-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-toolkit-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-cross-aarch64-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cupti-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cross-armhf-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvgraph-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvtx-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-cross-armhf-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-driver-cross-aarch64-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cublas-dev-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-cross-ppc64el-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cublas-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvrtc-cross-ppc64el-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cublas-dev-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvml-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cublas-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-cross-ppc64el-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-dev-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-gdb-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-nvml-dev-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvprune-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-dev-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-cross-aarch64-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-gpu-library-advisor-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvml-dev-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-toolkit-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-misc-headers-cross-armhf-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-cross-ppc64el-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-toolkit-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-core-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-cross-aarch64-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvrtc-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1604-10-1-local-10.1.168-418.67’ for glob ‘cuda*’
Note, selecting ‘cuda-sanitizer-api-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-compiler-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-demo-suite-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1604-9-2-local’ for glob ‘cuda*’
Note, selecting ‘cuda-misc-headers-cross-aarch64-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvrtc-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-misc-headers-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-misc-headers-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-compiler-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-nsight-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cublas-cross-armhf-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-command-line-tools-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvgraph-cross-aarch64-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvrtc-dev-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-driver-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1504-7-5-local’ for glob ‘cuda*’
Note, selecting ‘cuda-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvrtc-dev-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cross-armhf’ for glob ‘cuda*’
Note, selecting ‘cuda-nsight-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-documentation-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cross-ppc64el-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-memcheck-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda’ for glob ‘cuda*’
Note, selecting ‘cuda-documentation-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1604-9-2-148-local-patch-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cross-ppc64el’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-cross-armhf-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-memcheck-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cross-aarch64-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-misc-headers-cross-ppc64el-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvcc-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-gdb-src-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-libraries-dev-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-misc-headers-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvprof-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cuobjdump-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvgraph-cross-ppc64el-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nsight-compute-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvprof-10-1’ for glob ‘cuda*’
Package ‘cuda-license-7-5’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1204’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1404’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1404-7-5-local’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1410’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1504’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1504-7-5-local’ is not installed, so not removed
Package ‘cuda-cudart-cross-aarch64-8-0’ is not installed, so not removed
Package ‘cuda-driver-cross-aarch64-8-0’ is not installed, so not removed
Package ‘cuda-misc-headers-cross-aarch64-8-0’ is not installed, so not removed
Package ‘cuda-nvrtc-cross-aarch64-8-0’ is not installed, so not removed
Package ‘cuda-cusolver-cross-aarch64-8-0’ is not installed, so not removed
Package ‘cuda-cublas-cross-aarch64-8-0’ is not installed, so not removed
Package ‘cuda-cufft-cross-aarch64-8-0’ is not installed, so not removed
Package ‘cuda-curand-cross-aarch64-8-0’ is not installed, so not removed
Package ‘cuda-cusparse-cross-aarch64-8-0’ is not installed, so not removed
Package ‘cuda-npp-cross-aarch64-8-0’ is not installed, so not removed
Package ‘cuda-nvml-cross-aarch64-8-0’ is not installed, so not removed
Package ‘cuda-nvgraph-cross-aarch64-8-0’ is not installed, so not removed
Package ‘cuda-cudart-cross-ppc64el-8-0’ is not installed, so not removed
Package ‘cuda-driver-cross-ppc64el-8-0’ is not installed, so not removed
Package ‘cuda-misc-headers-cross-ppc64el-8-0’ is not installed, so not removed
Package ‘cuda-nvrtc-cross-ppc64el-8-0’ is not installed, so not removed
Package ‘cuda-cusolver-cross-ppc64el-8-0’ is not installed, so not removed
Package ‘cuda-cublas-cross-ppc64el-8-0’ is not installed, so not removed
Package ‘cuda-cufft-cross-ppc64el-8-0’ is not installed, so not removed
Package ‘cuda-curand-cross-ppc64el-8-0’ is not installed, so not removed
Package ‘cuda-cusparse-cross-ppc64el-8-0’ is not installed, so not removed
Package ‘cuda-npp-cross-ppc64el-8-0’ is not installed, so not removed
Package ‘cuda-nvml-cross-ppc64el-8-0’ is not installed, so not removed
Package ‘cuda-nvgraph-cross-ppc64el-8-0’ is not installed, so not removed
Package ‘cuda-cudart-cross-armhf-8-0’ is not installed, so not removed
Package ‘cuda-driver-cross-armhf-8-0’ is not installed, so not removed
Package ‘cuda-misc-headers-cross-armhf-8-0’ is not installed, so not removed
Package ‘cuda-cusolver-cross-armhf-8-0’ is not installed, so not removed
Package ‘cuda-cublas-cross-armhf-8-0’ is not installed, so not removed
Package ‘cuda-cufft-cross-armhf-8-0’ is not installed, so not removed
Package ‘cuda-curand-cross-armhf-8-0’ is not installed, so not removed
Package ‘cuda-cusparse-cross-armhf-8-0’ is not installed, so not removed
Package ‘cuda-npp-cross-armhf-8-0’ is not installed, so not removed
Note, selecting ‘nvidia-cuda-toolkit’ for glob ‘nvidia-cuda*’
Note, selecting ‘nvidia-cuda-dev’ for glob ‘nvidia-cuda*’
Note, selecting ‘nvidia-cuda-doc’ for glob ‘nvidia-cuda*’
Note, selecting ‘nvidia-cuda-gdb’ for glob ‘nvidia-cuda*’
Package ‘cuda-core-10-1’ is not installed, so not removed
Package ‘cuda-demo-suite-10-1’ is not installed, so not removed
Package ‘cuda-minimal-build-10-1’ is not installed, so not removed
Package ‘cuda-runtime-10-1’ is not installed, so not removed
Package ‘cuda-compat-10-1’ is not installed, so not removed
Package ‘cuda-gdb-src-10-1’ is not installed, so not removed
Package ‘cuda-10-1’ is not installed, so not removed
Package ‘cuda-cross-aarch64-8-0’ is not installed, so not removed
Package ‘cuda-nvml-dev-8-0’ is not installed, so not removed
Package ‘cuda-license-8-0’ is not installed, so not removed
Package ‘cuda-cross-aarch64’ is not installed, so not removed
Package ‘cuda-npp-8-0’ is not installed, so not removed
Package ‘cuda-cublas-8-0’ is not installed, so not removed
Package ‘cuda-runtime-8-0’ is not installed, so not removed
Package ‘cuda-curand-8-0’ is not installed, so not removed
Package ‘cuda-cross-ppc64el-8-0’ is not installed, so not removed
Package ‘cuda-visual-tools-8-0’ is not installed, so not removed
Package ‘cuda-cudart-dev-8-0’ is not installed, so not removed
Package ‘cuda-gdb-src-8-0’ is not installed, so not removed
Package ‘cuda-curand-dev-8-0’ is not installed, so not removed
Package ‘cuda-demo-suite-8-0’ is not installed, so not removed
Package ‘cuda-cross-armhf-8-0’ is not installed, so not removed
Package ‘cuda-cusparse-8-0’ is not installed, so not removed
Package ‘cuda-driver-dev-8-0’ is not installed, so not removed
Package ‘cuda-cusolver-dev-8-0’ is not installed, so not removed
Package ‘cuda-command-line-tools-8-0’ is not installed, so not removed
Package ‘cuda-minimal-build-8-0’ is not installed, so not removed
Package ‘cuda-cusparse-dev-8-0’ is not installed, so not removed
Package ‘cuda-nvgraph-8-0’ is not installed, so not removed
Package ‘cuda-misc-headers-8-0’ is not installed, so not removed
Package ‘cuda-cublas-dev-8-0’ is not installed, so not removed
Package ‘cuda-cross-ppc64el’ is not installed, so not removed
Package ‘cuda-cudart-8-0’ is not installed, so not removed
Package ‘cuda-cusolver-8-0’ is not installed, so not removed
Package ‘cuda-nvrtc-8-0’ is not installed, so not removed
Package ‘cuda-8-0’ is not installed, so not removed
Package ‘cuda-nvrtc-dev-8-0’ is not installed, so not removed
Package ‘cuda-npp-dev-8-0’ is not installed, so not removed
Package ‘cuda-toolkit-8-0’ is not installed, so not removed
Package ‘cuda-cross-armhf’ is not installed, so not removed
Package ‘cuda-cufft-dev-8-0’ is not installed, so not removed
Package ‘cuda-documentation-8-0’ is not installed, so not removed
Package ‘cuda-cufft-8-0’ is not installed, so not removed
Package ‘cuda-core-8-0’ is not installed, so not removed
Package ‘cuda-samples-8-0’ is not installed, so not removed
Package ‘cuda-nvgraph-dev-8-0’ is not installed, so not removed
Package ‘cuda-gdb-src-9-2’ is not installed, so not removed
Package ‘cuda-minimal-build-9-2’ is not installed, so not removed
Package ‘cuda-core-9-2’ is not installed, so not removed
You might want to run ‘apt-get -f install’ to correct these:
The following packages have unmet dependencies:
libcublas10 : Depends: cuda-license-10-1 but it is not going to be installed
E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).
whaler@whaler-desktop:~$

Also remove cublas:
sudo apt remove cuda* libcublas* nvidia-cuda*

whaler@whaler-desktop:~$ sudo apt remove cuda* libcublas* nvidia-cuda*
Reading package lists… Done
Building dependency tree
Reading state information… Done
Note, selecting ‘cuda-libraries-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-cross-aarch64-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-gpu-library-advisor-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cross-aarch64’ for glob ‘cuda*’
Note, selecting ‘cuda-command-line-tools-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvprune-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-visual-tools-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-driver-dev-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-command-line-tools-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-cross-armhf-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-visual-tools-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-driver-dev-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-nvgraph-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-driver-cross-armhf-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-runtime-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-runtime-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-cross-armhf-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-gdb-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-visual-tools-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cupti-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-dev-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-cross-ppc64el-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-libraries-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-dev-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1204’ for glob ‘cuda*’
Note, selecting ‘cuda-nvjpeg-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvrtc-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvml-cross-ppc64el-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-minimal-build-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-drivers’ for glob ‘cuda*’
Note, selecting ‘cuda-cuobjdump-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-nvgraph-dev-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1404’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1410’ for glob ‘cuda*’
Note, selecting ‘cuda-nvml-cross-aarch64-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvgraph-dev-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1504’ for glob ‘cuda*’
Note, selecting ‘cuda-nvgraph-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-dev-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1604’ for glob ‘cuda*’
Note, selecting ‘cuda-license-7-5’ for glob ‘cuda*’
Note, selecting ‘cuda-nvgraph-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-libraries-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-dev-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-cross-armhf-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-runtime-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-license-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-demo-suite-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-license-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-demo-suite-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-dev-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-cross-aarch64-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvrtc-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-dev-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-nvjpeg-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-samples-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cublas-cross-ppc64el-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nsight-systems-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-samples-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cublas-cross-aarch64-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-gdb-src-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1604-8-0-local’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-gdb-src-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-tools-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvtx-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-cross-aarch64-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvrtc-cross-aarch64-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-license-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvdisasm-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-samples-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-core-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-documentation-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-nvdisasm-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-core-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-compat-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-minimal-build-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-cross-ppc64el-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-dev-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-dev-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-minimal-build-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-cross-ppc64el-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-dev-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-dev-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-nvcc-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1404-7-5-local’ for glob ‘cuda*’
Note, selecting ‘cuda-nvvp-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvvp-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-tools-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-driver-cross-ppc64el-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-cross-armhf-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-toolkit-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-cross-aarch64-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cupti-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cross-armhf-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvgraph-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvtx-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-cross-armhf-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-driver-cross-aarch64-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cublas-dev-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-cross-ppc64el-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cublas-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvrtc-cross-ppc64el-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cublas-dev-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvml-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cublas-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-cross-ppc64el-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-dev-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-gdb-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-nvml-dev-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvprune-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-dev-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-cross-aarch64-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-gpu-library-advisor-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvml-dev-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-toolkit-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-misc-headers-cross-armhf-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-cross-ppc64el-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-toolkit-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-core-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-cross-aarch64-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvrtc-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1604-10-1-local-10.1.168-418.67’ for glob ‘cuda*’
Note, selecting ‘cuda-sanitizer-api-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-compiler-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-demo-suite-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1604-9-2-local’ for glob ‘cuda*’
Note, selecting ‘cuda-misc-headers-cross-aarch64-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvrtc-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-misc-headers-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-misc-headers-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-compiler-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-nsight-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cublas-cross-armhf-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-command-line-tools-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvgraph-cross-aarch64-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvrtc-dev-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-driver-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1504-7-5-local’ for glob ‘cuda*’
Note, selecting ‘cuda-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvrtc-dev-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cross-armhf’ for glob ‘cuda*’
Note, selecting ‘cuda-nsight-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-documentation-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cross-ppc64el-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-memcheck-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda’ for glob ‘cuda*’
Note, selecting ‘cuda-documentation-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1604-9-2-148-local-patch-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cross-ppc64el’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-cross-armhf-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-memcheck-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cross-aarch64-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-misc-headers-cross-ppc64el-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvcc-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-gdb-src-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-libraries-dev-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-misc-headers-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvprof-9-2’ for glob ‘cuda*’
Note, selecting ‘cuda-cuobjdump-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvgraph-cross-ppc64el-8-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nsight-compute-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvprof-10-1’ for glob ‘cuda*’
Package ‘cuda-license-7-5’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1204’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1404’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1404-7-5-local’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1410’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1504’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1504-7-5-local’ is not installed, so not removed
Package ‘cuda-cudart-cross-aarch64-8-0’ is not installed, so not removed
Package ‘cuda-driver-cross-aarch64-8-0’ is not installed, so not removed
Package ‘cuda-misc-headers-cross-aarch64-8-0’ is not installed, so not removed
Package ‘cuda-nvrtc-cross-aarch64-8-0’ is not installed, so not removed
Package ‘cuda-cusolver-cross-aarch64-8-0’ is not installed, so not removed
Package ‘cuda-cublas-cross-aarch64-8-0’ is not installed, so not removed
Package ‘cuda-cufft-cross-aarch64-8-0’ is not installed, so not removed
Package ‘cuda-curand-cross-aarch64-8-0’ is not installed, so not removed
Package ‘cuda-cusparse-cross-aarch64-8-0’ is not installed, so not removed
Package ‘cuda-npp-cross-aarch64-8-0’ is not installed, so not removed
Package ‘cuda-nvml-cross-aarch64-8-0’ is not installed, so not removed
Package ‘cuda-nvgraph-cross-aarch64-8-0’ is not installed, so not removed
Package ‘cuda-cudart-cross-ppc64el-8-0’ is not installed, so not removed
Package ‘cuda-driver-cross-ppc64el-8-0’ is not installed, so not removed
Package ‘cuda-misc-headers-cross-ppc64el-8-0’ is not installed, so not removed
Package ‘cuda-nvrtc-cross-ppc64el-8-0’ is not installed, so not removed
Package ‘cuda-cusolver-cross-ppc64el-8-0’ is not installed, so not removed
Package ‘cuda-cublas-cross-ppc64el-8-0’ is not installed, so not removed
Package ‘cuda-cufft-cross-ppc64el-8-0’ is not installed, so not removed
Package ‘cuda-curand-cross-ppc64el-8-0’ is not installed, so not removed
Package ‘cuda-cusparse-cross-ppc64el-8-0’ is not installed, so not removed
Package ‘cuda-npp-cross-ppc64el-8-0’ is not installed, so not removed
Package ‘cuda-nvml-cross-ppc64el-8-0’ is not installed, so not removed
Package ‘cuda-nvgraph-cross-ppc64el-8-0’ is not installed, so not removed
Package ‘cuda-cudart-cross-armhf-8-0’ is not installed, so not removed
Package ‘cuda-driver-cross-armhf-8-0’ is not installed, so not removed
Package ‘cuda-misc-headers-cross-armhf-8-0’ is not installed, so not removed
Package ‘cuda-cusolver-cross-armhf-8-0’ is not installed, so not removed
Package ‘cuda-cublas-cross-armhf-8-0’ is not installed, so not removed
Package ‘cuda-cufft-cross-armhf-8-0’ is not installed, so not removed
Package ‘cuda-curand-cross-armhf-8-0’ is not installed, so not removed
Package ‘cuda-cusparse-cross-armhf-8-0’ is not installed, so not removed
Package ‘cuda-npp-cross-armhf-8-0’ is not installed, so not removed
Note, selecting ‘libcublas-dev’ for glob ‘libcublas*’
Note, selecting ‘libcublas10’ for glob ‘libcublas*’
Note, selecting ‘libcublas7.5’ for glob ‘libcublas*’
Note, selecting ‘nvidia-cuda-toolkit’ for glob ‘nvidia-cuda*’
Note, selecting ‘nvidia-cuda-dev’ for glob ‘nvidia-cuda*’
Note, selecting ‘nvidia-cuda-doc’ for glob ‘nvidia-cuda*’
Note, selecting ‘nvidia-cuda-gdb’ for glob ‘nvidia-cuda*’
Package ‘cuda-core-10-1’ is not installed, so not removed
Package ‘cuda-demo-suite-10-1’ is not installed, so not removed
Package ‘cuda-minimal-build-10-1’ is not installed, so not removed
Package ‘cuda-runtime-10-1’ is not installed, so not removed
Package ‘libcublas-dev’ is not installed, so not removed
Package ‘cuda-compat-10-1’ is not installed, so not removed
Package ‘cuda-gdb-src-10-1’ is not installed, so not removed
Package ‘cuda-10-1’ is not installed, so not removed
Package ‘cuda-cross-aarch64-8-0’ is not installed, so not removed
Package ‘cuda-nvml-dev-8-0’ is not installed, so not removed
Package ‘cuda-license-8-0’ is not installed, so not removed
Package ‘cuda-cross-aarch64’ is not installed, so not removed
Package ‘cuda-npp-8-0’ is not installed, so not removed
Package ‘cuda-cublas-8-0’ is not installed, so not removed
Package ‘cuda-runtime-8-0’ is not installed, so not removed
Package ‘cuda-curand-8-0’ is not installed, so not removed
Package ‘cuda-cross-ppc64el-8-0’ is not installed, so not removed
Package ‘cuda-visual-tools-8-0’ is not installed, so not removed
Package ‘cuda-cudart-dev-8-0’ is not installed, so not removed
Package ‘cuda-gdb-src-8-0’ is not installed, so not removed
Package ‘cuda-curand-dev-8-0’ is not installed, so not removed
Package ‘cuda-demo-suite-8-0’ is not installed, so not removed
Package ‘cuda-cross-armhf-8-0’ is not installed, so not removed
Package ‘cuda-cusparse-8-0’ is not installed, so not removed
Package ‘cuda-driver-dev-8-0’ is not installed, so not removed
Package ‘cuda-cusolver-dev-8-0’ is not installed, so not removed
Package ‘cuda-command-line-tools-8-0’ is not installed, so not removed
Package ‘cuda-minimal-build-8-0’ is not installed, so not removed
Package ‘cuda-cusparse-dev-8-0’ is not installed, so not removed
Package ‘cuda-nvgraph-8-0’ is not installed, so not removed
Package ‘cuda-misc-headers-8-0’ is not installed, so not removed
Package ‘cuda-cublas-dev-8-0’ is not installed, so not removed
Package ‘cuda-cross-ppc64el’ is not installed, so not removed
Package ‘cuda-cudart-8-0’ is not installed, so not removed
Package ‘cuda-cusolver-8-0’ is not installed, so not removed
Package ‘cuda-nvrtc-8-0’ is not installed, so not removed
Package ‘cuda-8-0’ is not installed, so not removed
Package ‘cuda-nvrtc-dev-8-0’ is not installed, so not removed
Package ‘cuda-npp-dev-8-0’ is not installed, so not removed
Package ‘cuda-toolkit-8-0’ is not installed, so not removed
Package ‘cuda-cross-armhf’ is not installed, so not removed
Package ‘cuda-cufft-dev-8-0’ is not installed, so not removed
Package ‘cuda-documentation-8-0’ is not installed, so not removed
Package ‘cuda-cufft-8-0’ is not installed, so not removed
Package ‘cuda-core-8-0’ is not installed, so not removed
Package ‘cuda-samples-8-0’ is not installed, so not removed
Package ‘cuda-nvgraph-dev-8-0’ is not installed, so not removed
Package ‘cuda-gdb-src-9-2’ is not installed, so not removed
Package ‘cuda-minimal-build-9-2’ is not installed, so not removed
Package ‘cuda-core-9-2’ is not installed, so not removed
You might want to run ‘apt-get -f install’ to correct these:
The following packages have unmet dependencies:
libnvblas7.5 : Depends: libcublas7.5 (>= 6.5) but it is not going to be installed
E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).

Rinse,repeat
sudo apt remove cuda* libcublas* libnvblas* nvidia-cuda*

Works, appreciated it!

Reading package lists… Done
Building dependency tree
Reading state information… Done
Note, selecting ‘cuda-nvprune-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvprune-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvgraph-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvgraph-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cublas-dev-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-gdb-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-gdb-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-visual-tools-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-visual-tools-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-dev-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cupti-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cupti-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-libraries-dev-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-libraries-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1204’ for glob ‘cuda*’
Note, selecting ‘cuda-nvjpeg-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvjpeg-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvrtc-dev-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvrtc-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-minimal-build-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-drivers’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1404’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1410’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1504’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1604’ for glob ‘cuda*’
Note, selecting ‘cuda-license-7-5’ for glob ‘cuda*’
Note, selecting ‘cuda-libraries-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-libraries-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-runtime-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-runtime-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-dev-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvrtc-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvrtc-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvjpeg-dev-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvjpeg-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nsight-systems-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1604-10-0-local-10.0.130-410.48’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-tools-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-tools-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvtx-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvtx-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-license-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-license-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvdisasm-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvdisasm-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-samples-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-samples-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-documentation-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-documentation-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-compat-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvcc-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvcc-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1404-7-5-local’ for glob ‘cuda*’
Note, selecting ‘cuda-nvvp-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvvp-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-toolkit-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-toolkit-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvgraph-dev-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvgraph-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-dev-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvml-dev-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvml-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-gpu-library-advisor-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-gpu-library-advisor-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cublas-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-core-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-dev-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1604-10-1-local-10.1.168-418.67’ for glob ‘cuda*’
Note, selecting ‘cuda-sanitizer-api-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-compiler-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-compiler-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-demo-suite-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-demo-suite-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-dev-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nsight-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nsight-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-command-line-tools-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-command-line-tools-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-dev-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-driver-dev-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-driver-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1504-7-5-local’ for glob ‘cuda*’
Note, selecting ‘cuda-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-memcheck-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-memcheck-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda’ for glob ‘cuda*’
Note, selecting ‘cuda-gdb-src-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-misc-headers-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-misc-headers-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cuobjdump-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cuobjdump-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nsight-compute-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nsight-compute-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvprof-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvprof-10-1’ for glob ‘cuda*’
Package ‘cuda-license-7-5’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1204’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1404’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1404-7-5-local’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1410’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1504’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1504-7-5-local’ is not installed, so not removed
Note, selecting ‘libcublas-dev’ for glob ‘libcublas*’
Note, selecting ‘libcublas10’ for glob ‘libcublas*’
Note, selecting ‘libcublas7.5’ for glob ‘libcublas*’
Note, selecting ‘libnvblas7.5’ for glob ‘libnvblas*’
Note, selecting ‘nvidia-cuda-toolkit’ for glob ‘nvidia-cuda*’
Note, selecting ‘nvidia-cuda-dev’ for glob ‘nvidia-cuda*’
Note, selecting ‘nvidia-cuda-doc’ for glob ‘nvidia-cuda*’
Note, selecting ‘nvidia-cuda-gdb’ for glob ‘nvidia-cuda*’
Package ‘cuda-core-10-1’ is not installed, so not removed
Package ‘cuda-minimal-build-10-1’ is not installed, so not removed
Package ‘libcublas-dev’ is not installed, so not removed
Package ‘cuda-compat-10-1’ is not installed, so not removed
Package ‘cuda-gdb-src-10-1’ is not installed, so not removed
You might want to run ‘apt-get -f install’ to correct these:
The following packages have unmet dependencies.
libnvinfer5 : Depends: cuda-cublas-10-0 but it is not going to be installed
E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).

I still cannot fix the issue.

johkpunch321, You seem to have also TensorRT installed, please try
sudo apt remove cuda* libcublas* libnvblas* nvidia-cuda* libnvinfer*

the system output :
Reading package lists… Done
Building dependency tree
Reading state information… Done
Note, selecting ‘libcublas-dev’ for glob ‘libcublas*’
Note, selecting ‘libcublas10’ for glob ‘libcublas*’
Note, selecting ‘libcublas7.5’ for glob ‘libcublas*’
Note, selecting ‘libnvblas7.5’ for glob ‘libnvblas*’
Note, selecting ‘nvidia-cuda-toolkit’ for glob ‘nvidia-cuda*’
Note, selecting ‘nvidia-cuda-dev’ for glob ‘nvidia-cuda*’
Note, selecting ‘nvidia-cuda-doc’ for glob ‘nvidia-cuda*’
Note, selecting ‘nvidia-cuda-gdb’ for glob ‘nvidia-cuda*’
Note, selecting ‘libnvinfer-dev’ for glob ‘libnvinfer*’
Note, selecting ‘libnvinfer4’ for glob ‘libnvinfer*’
Note, selecting ‘libnvinfer5’ for glob ‘libnvinfer*’
Note, selecting ‘libnvinfer5’ instead of ‘libnvinfer4’
E: Unable to locate package cuda_10.1.168_418.67_linux.run
E: Couldn’t find any package by glob ‘cuda_10.1.168_418.67_linux.run’
E: Couldn’t find any package by regex ‘cuda_10.1.168_418.67_linux.run’
E: Unable to locate package cuda-gdb-10.1.168
E: Couldn’t find any package by glob ‘cuda-gdb-10.1.168’
E: Couldn’t find any package by regex ‘cuda-gdb-10.1.168’
E: Unable to locate package cuda-gdb-10.1.168.src.tar.gz
E: Couldn’t find any package by glob ‘cuda-gdb-10.1.168.src.tar.gz’
E: Couldn’t find any package by regex ‘cuda-gdb-10.1.168.src.tar.gz’
E: Unable to locate package cuda-repo-ubuntu1604_10.0.130-1_amd64.deb
E: Couldn’t find any package by glob ‘cuda-repo-ubuntu1604_10.0.130-1_amd64.deb’
E: Couldn’t find any package by regex ‘cuda-repo-ubuntu1604_10.0.130-1_amd64.deb’
E: Unable to locate package cuda-repo-ubuntu1604_10.1.168-1_amd64(1).deb
E: Couldn’t find any package by glob ‘cuda-repo-ubuntu1604_10.1.168-1_amd64(1).deb’
E: Couldn’t find any package by regex ‘cuda-repo-ubuntu1604_10.1.168-1_amd64(1).deb’
E: Unable to locate package cuda-repo-ubuntu1604_10.1.168-1_amd64.deb
E: Couldn’t find any package by glob ‘cuda-repo-ubuntu1604_10.1.168-1_amd64.deb’
E: Couldn’t find any package by regex ‘cuda-repo-ubuntu1604_10.1.168-1_amd64.deb’
E: Unable to locate package cuda-repo-ubuntu1604-10-1-local-10.1.168-418.67_1.0-1_amd64.deb
E: Couldn’t find any package by glob ‘cuda-repo-ubuntu1604-10-1-local-10.1.168-418.67_1.0-1_amd64.deb’
E: Couldn’t find any package by regex ‘cuda-repo-ubuntu1604-10-1-local-10.1.168-418.67_1.0-1_amd64.deb’

Please change to an empty directory, then run the command again.

is this what you mean?

(base) the1@SD03286LNX:~$ sudo apt remove cuda* libcublas* libnvblas* nvidia-cuda* libnvinfer*
Reading package lists… Done
Building dependency tree
Reading state information… Done
Note, selecting ‘libcublas-dev’ for glob ‘libcublas*’
Note, selecting ‘libcublas10’ for glob ‘libcublas*’
Note, selecting ‘libcublas7.5’ for glob ‘libcublas*’
Note, selecting ‘libnvblas7.5’ for glob ‘libnvblas*’
Note, selecting ‘nvidia-cuda-toolkit’ for glob ‘nvidia-cuda*’
Note, selecting ‘nvidia-cuda-dev’ for glob ‘nvidia-cuda*’
Note, selecting ‘nvidia-cuda-doc’ for glob ‘nvidia-cuda*’
Note, selecting ‘nvidia-cuda-gdb’ for glob ‘nvidia-cuda*’
Note, selecting ‘libnvinfer-dev’ for glob ‘libnvinfer*’
Note, selecting ‘libnvinfer4’ for glob ‘libnvinfer*’
Note, selecting ‘libnvinfer5’ for glob ‘libnvinfer*’
Note, selecting ‘libnvinfer5’ instead of ‘libnvinfer4’
E: Unable to locate package cuda-9-0_9.0.176-1_amd64.deb
E: Couldn’t find any package by glob ‘cuda-9-0_9.0.176-1_amd64.deb’
E: Couldn’t find any package by regex ‘cuda-9-0_9.0.176-1_amd64.deb’

The directory you changed to is not empty, it contains the file “cuda-9-0_9.0.176-1_amd64.deb”.

Hello,

I also have a broken apt package. I’m trying to remove Cuda and its dependencies using your method but I cannot get it to work. Please can you advise? Many thanks.

$ sudo apt remove cuda* libcublas* libnvblas* nvidia-cuda* libnvinfer*

Reading package lists… Done
Building dependency tree
Reading state information… Done
Note, selecting ‘cuda-cusparse-cross-qnx-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-cross-qnx-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvprune-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvprune-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-command-line-tools-9-0’ for glob ‘cuda*’
Note, selecting ‘cuda-driver-dev-9-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvgraph-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvgraph-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cublas-dev-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-gdb-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-gdb-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nsight-compute–10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-visual-tools-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-visual-tools-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-dev-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cupti-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cupti-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-cross-qnx-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-libraries-dev-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-libraries-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cublas-cross-qnx-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1204’ for glob ‘cuda*’
Note, selecting ‘cuda-nvjpeg-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvjpeg-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvrtc-dev-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvrtc-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-minimal-build-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-minimal-build-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-drivers’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1404’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1410’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-cross-qnx-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1504’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1604’ for glob ‘cuda*’
Note, selecting ‘cuda-license-7-5’ for glob ‘cuda*’
Note, selecting ‘cuda-libraries-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-libraries-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-dev-9-0’ for glob ‘cuda*’
Note, selecting ‘cuda-runtime-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-runtime-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1804’ for glob ‘cuda*’
Note, selecting ‘cuda-drivers-diagnostic’ for glob ‘cuda*’
Note, selecting ‘cuda-license-9-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-dev-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvrtc-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvrtc-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvjpeg-dev-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvjpeg-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nsight-systems-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-9-0’ for glob ‘cuda*’
Note, selecting ‘cuda-tools-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-tools-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvtx-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvtx-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-license-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-license-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvdisasm-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvdisasm-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-samples-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-samples-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-documentation-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-documentation-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-cross-qnx-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-9-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cross-qnx’ for glob ‘cuda*’
Note, selecting ‘cuda-core-9-0’ for glob ‘cuda*’
Note, selecting ‘cuda-compat-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-compat-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-9-0’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1804-10-0-local-10.0.130-410.48’ for glob ‘cuda*’
Note, selecting ‘cuda-nvcc-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvcc-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1404-7-5-local’ for glob ‘cuda*’
Note, selecting ‘cuda-nvvp-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvvp-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cross-qnx-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1804-10-1-local-10.1.243-418.87.00’ for glob ‘cuda*’
Note, selecting ‘cuda-toolkit-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-toolkit-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvgraph-dev-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvgraph-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-dev-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvml-dev-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvml-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cublas-9-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-9-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-9-0’ for glob ‘cuda*’
Note, selecting ‘cuda-gpu-library-advisor-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-gpu-library-advisor-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cublas-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-core-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-core-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-dev-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-driver-cross-qnx-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-sanitizer-api-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-compiler-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-compiler-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-demo-suite-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-demo-suite-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-dev-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-misc-headers-9-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nsight-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nsight-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-command-line-tools-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-command-line-tools-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-dev-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-driver-dev-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-driver-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1504-7-5-local’ for glob ‘cuda*’
Note, selecting ‘cuda-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-misc-headers-cross-qnx-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-memcheck-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-memcheck-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-cross-qnx-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-gdb-src-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-gdb-src-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-misc-headers-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-misc-headers-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cuobjdump-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-cuobjdump-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nsight-compute-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nsight-compute-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvprof-10-0’ for glob ‘cuda*’
Note, selecting ‘cuda-nvprof-10-1’ for glob ‘cuda*’
Package ‘cuda-license-7-5’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1204’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1404’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1404-7-5-local’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1410’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1504’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1504-7-5-local’ is not installed, so not removed
Package ‘cuda-cudart-cross-qnx-10-0’ is not installed, so not removed
Package ‘cuda-driver-cross-qnx-10-0’ is not installed, so not removed
Package ‘cuda-misc-headers-cross-qnx-10-0’ is not installed, so not removed
Package ‘cuda-cusolver-cross-qnx-10-0’ is not installed, so not removed
Package ‘cuda-cublas-cross-qnx-10-0’ is not installed, so not removed
Package ‘cuda-cufft-cross-qnx-10-0’ is not installed, so not removed
Package ‘cuda-curand-cross-qnx-10-0’ is not installed, so not removed
Package ‘cuda-cusparse-cross-qnx-10-0’ is not installed, so not removed
Package ‘cuda-npp-cross-qnx-10-0’ is not installed, so not removed
Note, selecting ‘libcublas-dev’ for glob ‘libcublas*’
Note, selecting ‘libcublas10’ for glob ‘libcublas*’
Note, selecting ‘libcublas9.1’ for glob ‘libcublas*’
Note, selecting ‘libnvblas9.1’ for glob ‘libnvblas*’
Note, selecting ‘nvidia-cuda-toolkit’ for glob ‘nvidia-cuda*’
Note, selecting ‘nvidia-cuda-dev’ for glob ‘nvidia-cuda*’
Note, selecting ‘nvidia-cuda-doc’ for glob ‘nvidia-cuda*’
Note, selecting ‘nvidia-cuda-gdb’ for glob ‘nvidia-cuda*’
Note, selecting ‘libnvinfer-dev’ for glob ‘libnvinfer*’
Note, selecting ‘libnvinfer4’ for glob ‘libnvinfer*’
Note, selecting ‘libnvinfer5’ for glob ‘libnvinfer*’
Package ‘cuda-minimal-build-10-1’ is not installed, so not removed
Package ‘cuda-core-10-1’ is not installed, so not removed
Package ‘cuda-compat-10-1’ is not installed, so not removed
Package ‘libcublas-dev’ is not installed, so not removed
Package ‘cuda-gdb-src-10-1’ is not installed, so not removed
Package ‘cuda-core-10-0’ is not installed, so not removed
Package ‘cuda-cross-qnx-10-0’ is not installed, so not removed
Package ‘cuda-cross-qnx’ is not installed, so not removed
Package ‘cuda-drivers-diagnostic’ is not installed, so not removed
Package ‘cuda-gdb-src-10-0’ is not installed, so not removed
Package ‘cuda-minimal-build-10-0’ is not installed, so not removed
Package ‘cuda-nsight-compute–10-0’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1804’ is not installed, so not removed
Package ‘cuda-compat-10-0’ is not installed, so not removed
Package ‘libnvinfer-dev’ is not installed, so not removed
Package ‘libnvinfer5’ is not installed, so not removed
You might want to run ‘apt --fix-broken install’ to correct these.
The following packages have unmet dependencies:
libnvgraph9.1 : Depends: libcublas9.1 but it is not going to be installed
E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution).

$ sudo apt --fix-broken install

Reading package lists… Done
Building dependency tree
Reading state information… Done
Correcting dependencies… Done
The following additional packages will be installed:
libcublas-dev
The following NEW packages will be installed:
libcublas-dev
0 upgraded, 1 newly installed, 0 to remove and 33 not upgraded.
59 not fully installed or removed.
Need to get 0 B/38.9 MB of archives.
After this operation, 109 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 file:/var/cuda-repo-10-1-local-10.1.243-418.87.00 libcublas-dev 10.2.1.243-1 [38.9 MB]
(Reading database … 577118 files and directories currently installed.)
Preparing to unpack …/libcublas-dev_10.2.1.243-1_amd64.deb …
Unpacking libcublas-dev (10.2.1.243-1) …
dpkg: error processing archive /var/cuda-repo-10-1-local-10.1.243-418.87.00/./libcublas-dev_10.2.1.243-1_amd64.deb (–unpack):
trying to overwrite ‘/usr/lib/x86_64-linux-gnu/libcublas_static.a’, which is also in package nvidia-cuda-dev 9.1.85-3ubuntu1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cuda-repo-10-1-local-10.1.243-418.87.00/./libcublas-dev_10.2.1.243-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Looks like you also installed the nvgraph library, just add
libnvgraph*
to the removal list.

Thanks a lot, that worked!

I have the same exact problem. Except none of the above works for me.

$ sudo apt remove cuda* libcublas* libnvblas* nvidia-cuda* libnvinfer*
[sudo] password for millbrook2:
Reading package lists… Done
Building dependency tree
Reading state information… Done
Note, selecting ‘cuda-nvprune-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvgraph-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-gdb-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-visual-tools-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cupti-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-libraries-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1204’ for glob ‘cuda*’
Note, selecting ‘cuda-nvjpeg-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvrtc-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-minimal-build-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-drivers’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1404’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1410’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1504’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1604-10-2-local-10.2.89-440.33.01’ for glob ‘cuda*’
Note, selecting ‘cuda-license-7-5’ for glob ‘cuda*’
Note, selecting ‘cuda-libraries-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-runtime-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-drivers-diagnostic’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvrtc-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvjpeg-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nsight-systems-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cusparse-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-tools-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvtx-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-license-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvdisasm-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-samples-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-documentation-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-compat-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvcc-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1404-7-5-local’ for glob ‘cuda*’
Note, selecting ‘cuda-nvvp-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-toolkit-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvgraph-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cudart-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvml-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-gpu-library-advisor-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-core-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cusolver-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-sanitizer-api-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-compiler-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-demo-suite-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-npp-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nsight-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-curand-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-command-line-tools-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cufft-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-driver-dev-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1504-7-5-local’ for glob ‘cuda*’
Note, selecting ‘cuda-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-memcheck-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda’ for glob ‘cuda*’
Note, selecting ‘cuda-repo-ubuntu1604-10-1-local-10.1.243-418.87.00’ for glob ‘cuda*’
Note, selecting ‘cuda-gdb-src-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-misc-headers-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-cuobjdump-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nsight-compute-10-1’ for glob ‘cuda*’
Note, selecting ‘cuda-nvprof-10-1’ for glob ‘cuda*’
Package ‘cuda-license-7-5’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1204’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1404’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1404-7-5-local’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1410’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1504’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1504-7-5-local’ is not installed, so not removed
Package ‘cuda-drivers-diagnostic’ is not installed, so not removed
Package ‘cuda-repo-ubuntu1604-10-2-local-10.2.89-440.33.01’ is not installed, so not removed
Note, selecting ‘libcublas-dev’ for glob ‘libcublas*’
Note, selecting ‘libcublas10’ for glob ‘libcublas*’
Note, selecting ‘libcublas7.5’ for glob ‘libcublas*’
Note, selecting ‘libnvblas7.5’ for glob ‘libnvblas*’
Note, selecting ‘nvidia-cuda-toolkit’ for glob ‘nvidia-cuda*’
Note, selecting ‘nvidia-cuda-dev’ for glob ‘nvidia-cuda*’
Note, selecting ‘nvidia-cuda-doc’ for glob ‘nvidia-cuda*’
Note, selecting ‘nvidia-cuda-gdb’ for glob ‘nvidia-cuda*’
E: Unable to locate package libnvinfer*
E: Couldn’t find any package by glob ‘libnvinfer*’
E: Couldn’t find any package by regex ‘libnvinfer*’

$ sudo apt --fix-broken install
Reading package lists… Done
Building dependency tree
Reading state information… Done
Correcting dependencies… Done
The following packages were automatically installed and are no longer required:
linux-headers-4.15.0-45 linux-headers-4.15.0-45-generic linux-image-4.15.0-45-generic linux-modules-4.15.0-45-generic
linux-modules-extra-4.15.0-45-generic
Use ‘sudo apt autoremove’ to remove them.
The following additional packages will be installed:
libcublas-dev
The following NEW packages will be installed
libcublas-dev
0 to upgrade, 1 to newly install, 0 to remove and 102 not to upgrade.
60 not fully installed or removed.
Need to get 0 B/38.9 MB of archives.
After this operation, 109 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 file:/var/cuda-repo-10-1-local-10.1.243-418.87.00 libcublas-dev 10.2.1.243-1 [38.9 MB]
(Reading database … 357971 files and directories currently installed.)
Preparing to unpack …/libcublas-dev_10.2.1.243-1_amd64.deb …
Unpacking libcublas-dev (10.2.1.243-1) …
dpkg: error processing archive /var/cuda-repo-10-1-local-10.1.243-418.87.00/./libcublas-dev_10.2.1.243-1_amd64.deb (–unpack):
trying to overwrite ‘/usr/lib/x86_64-linux-gnu/libcublas_static.a’, which is also in package nvidia-cuda-dev 7.5.18-0ubuntu1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cuda-repo-10-1-local-10.1.243-418.87.00/./libcublas-dev_10.2.1.243-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any help is much appreciated!