Installed Cuda toolkit 7.5, but libcudart.so.5.5 remains

After installing Cuda Toolkit 7.5 on Ubuntu 14.04 (via apt-get of .deb file, followed by update of nvidia driver to 352.63), nvcc --version, nvidia-smi, and cuda samples work as expected.

7.5 is installed in /usr/local/cuda-7.5, with /usr/local/cuda soft-linked to that location.

The file /etc/profile.d/cuda-7-5.sh contains just the line:

PATH=/usr/local/cuda/bin:$PATH

And both /etc/ld.so.conf.d/cuda-7-5.conf and /etc/ld.so.conf.d/cuda-7-5.sh contain just the line:

/usr/local/cuda/lib64

However, the system still contains /usr/lib/x86_64-linux-gnu/libcudart.so.5.5.

Questions:

  1. Why is /usr/lib/x86_64-linux-gnu/libcudart.so.5.5 still present? Is it required, or can it be removed? What are the steps for removing it, and will 7.5 need to be reinstalled?
  2. Are the contents of /etc/ld.so.conf.d/cuda-7-5.sh correct, or should it be as follows?:
    LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
    
  1. Presumably it is still present because that is where the CUDA 5.5 install method that you used placed it. That is not a typical location for that file (e.g. it is not the default location) but it’s not out of the question that the install process you used for CUDA 5.5 may have placed it there. It shouldn’t hurt anything by leaving it there. If you have CUDA applications that were linked against that library, know how to find that library in its current location, and which you don’t intend to rebuild/relink, then removing that library could break those applications. Otherwise, removing it should not be an issue if you intend to use CUDA 7.5

  2. The files passed to the runtime dynamic linker configurator (ldconfig) should be of the first form you listed:

/usr/local/cuda/lib64

not this:

LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

.sh is not the file extension I would expect, but it depends on the source files being parsed by your runtime dynamic linker configuration process (ldconfig).