My Lubuntu system has recently started complaining that it cannot update software and is offering a Partial Upgrade - which I understand is bad news.
I suspect it is related to my Tensorflow installation (most of my problems are, and I fear changing it in any way !).
nvcc --version
reports release 10.1, V10.1.243
nvidia-smi
reports Driver Version: 440.64.00 CUDA Version: 10.2
cuDNN is version 7.6
Tensorflow is version 1.14.0
It appears that the update wants to remove the cuda and nvidia driver packages (I have appended the output from dist-upgrade). Please can someone explain what the root of the problem is here, and what I can do to move on (hopefully without totally destroying my working tensorflow installation).
sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
cuda-command-line-tools-10-1 cuda-compiler-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-gdb-10-1 cuda-gpu-library-advisor-10-1
cuda-libraries-10-1 cuda-libraries-dev-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 libnvidia-cfg1-440 libnvidia-common-440
libnvidia-fbc1-440 libxnvctrl0 linux-headers-4.15.0-96 linux-headers-4.15.0-96-generic
linux-image-4.15.0-96-generic linux-modules-4.15.0-96-generic
linux-modules-extra-4.15.0-96-generic nsight-compute-2019.5.0 nsight-systems-2019.5.2
nvidia-compute-utils-440 nvidia-kernel-source-440 nvidia-modprobe nvidia-prime
nvidia-settings python-apt python-bs4 python-html5lib python-lxml python-webencodings
screen-resolution-extra xserver-xorg-video-nvidia-440
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED
cuda-10-1 cuda-demo-suite-10-1 cuda-drivers cuda-runtime-10-1 libnvidia-decode-440
libnvidia-encode-440 libnvidia-gl-440 libnvidia-ifr1-440 nvidia-dkms-440
nvidia-driver-440 nvidia-kernel-common-440 nvidia-utils-440
The following NEW packages will be installed
linux-headers-4.15.0-106 linux-headers-4.15.0-106-generic
linux-image-4.15.0-106-generic linux-modules-4.15.0-106-generic
linux-modules-extra-4.15.0-106-generic
The following packages will be upgraded:
aptdaemon aptdaemon-data ca-certificates chromium-codecs-ffmpeg-extra firefox
firefox-locale-en flashplugin-installer google-chrome-stable intel-microcode
libjpeg-turbo8 libjpeg-turbo8-dev libjson-c-dev libjson-c3 libnautilus-extension1a
libnetplan0 libnss-systemd libpam-systemd libpulse-mainloop-glib0 libpulse0
libpulsedsp libsqlite3-0 libsqlite3-dev libssl-dev libssl-doc libssl1.1 libsystemd0
libudev1 libxnvctrl0 linux-generic linux-headers-generic linux-image-generic
linux-libc-dev linux-signed-generic netplan.io nodejs nplan nvidia-modprobe
nvidia-settings openssl pulseaudio pulseaudio-module-bluetooth pulseaudio-utils
python-apt python-apt-common python-rosdistro python-rosdistro-modules python3-apport
python3-apt python3-aptdaemon python3-aptdaemon.gtk3widgets python3-problem-report
python3-software-properties ros-melodic-actionlib ros-melodic-actionlib-msgs
ros-melodic-actionlib-tutorials ros-melodic-angles ros-melodic-bond
ros-melodic-bond-core ros-melodic-bondcpp ros-melodic-bondpy
ros-melodic-camera-calibration ros-melodic-camera-calibration-parsers
ros-melodic-camera-info-manager ros-melodic-catkin ros-melodic-class-loader
ros-melodic-cmake-modules ros-melodic-common-msgs ros-melodic-common-tutorials
ros-melodic-compressed-depth-image-transport ros-melodic-compressed-image-transport
ros-melodic-control-msgs ros-melodic-control-toolbox ros-melodic-controller-interface
ros-melodic-controller-manager ros-melodic-controller-manager-msgs
ros-melodic-cpp-common ros-melodic-cv-bridge ros-melodic-depth-image-proc
ros-melodic-desktop ros-melodic-desktop-full ros-melodic-diagnostic-aggregator
ros-melodic-diagnostic-analysis ros-melodic-diagnostic-common-diagnostics
ros-melodic-diagnostic-msgs ros-melodic-diagnostic-updater ros-melodic-diagnostics
ros-melodic-diff-drive-controller ros-melodic-dynamic-reconfigure
ros-melodic-eigen-conversions ros-melodic-executive-smach ros-melodic-filters
ros-melodic-forward-command-controller ros-melodic-gazebo-dev ros-melodic-gazebo-msgs
ros-melodic-gazebo-plugins ros-melodic-gazebo-ros ros-melodic-gazebo-ros-control
ros-melodic-gazebo-ros-pkgs ros-melodic-gencpp ros-melodic-geneus ros-melodic-genlisp
ros-melodic-genmsg ros-melodic-gennodejs ros-melodic-genpy ros-melodic-geometry
ros-melodic-geometry-msgs ros-melodic-geometry-tutorials ros-melodic-gl-dependency
ros-melodic-hardware-interface ros-melodic-image-common ros-melodic-image-geometry
ros-melodic-image-pipeline ros-melodic-image-proc ros-melodic-image-publisher
ros-melodic-image-rotate ros-melodic-image-transport
ros-melodic-image-transport-plugins ros-melodic-image-view
ros-melodic-interactive-marker-tutorials ros-melodic-interactive-markers
ros-melodic-joint-limits-interface ros-melodic-joint-state-controller
ros-melodic-joint-state-publisher ros-melodic-kdl-conversions ros-melodic-kdl-parser
ros-melodic-kdl-parser-py ros-melodic-laser-assembler ros-melodic-laser-filters
ros-melodic-laser-geometry ros-melodic-laser-pipeline ros-melodic-librviz-tutorial
ros-melodic-libuvc ros-melodic-libuvc-camera ros-melodic-map-msgs
ros-melodic-media-export ros-melodic-message-filters ros-melodic-message-generation
ros-melodic-message-runtime ros-melodic-mk ros-melodic-nav-msgs ros-melodic-nodelet
ros-melodic-nodelet-core ros-melodic-nodelet-topic-tools
ros-melodic-nodelet-tutorial-math ros-melodic-orocos-kdl ros-melodic-pcl-conversions
ros-melodic-pcl-msgs ros-melodic-pcl-ros ros-melodic-perception
ros-melodic-perception-pcl ros-melodic-pluginlib ros-melodic-pluginlib-tutorials
ros-melodic-polled-camera ros-melodic-position-controllers
ros-melodic-python-orocos-kdl ros-melodic-python-qt-binding ros-melodic-qt-dotgraph
ros-melodic-qt-gui ros-melodic-qt-gui-cpp ros-melodic-qt-gui-py-common
ros-melodic-qwt-dependency ros-melodic-realtime-tools ros-melodic-resource-retriever
ros-melodic-robot ros-melodic-robot-state-publisher ros-melodic-ros
ros-melodic-ros-base ros-melodic-ros-comm ros-melodic-ros-core
ros-melodic-ros-environment ros-melodic-ros-tutorials ros-melodic-rosbag
ros-melodic-rosbag-migration-rule ros-melodic-rosbag-storage ros-melodic-rosbash
ros-melodic-rosboost-cfg ros-melodic-rosbuild ros-melodic-rosclean
ros-melodic-rosconsole ros-melodic-rosconsole-bridge ros-melodic-roscpp
ros-melodic-roscpp-core ros-melodic-roscpp-serialization ros-melodic-roscpp-traits
ros-melodic-roscpp-tutorials ros-melodic-roscreate ros-melodic-rosgraph
ros-melodic-rosgraph-msgs ros-melodic-roslang ros-melodic-roslaunch ros-melodic-roslib
ros-melodic-roslint ros-melodic-roslisp ros-melodic-roslz4 ros-melodic-rosmake
ros-melodic-rosmaster ros-melodic-rosmsg ros-melodic-rosnode ros-melodic-rosout
ros-melodic-rospack ros-melodic-rosparam ros-melodic-rospy ros-melodic-rospy-tutorials
ros-melodic-rosservice ros-melodic-rostest ros-melodic-rostime ros-melodic-rostopic
ros-melodic-rosunit ros-melodic-roswtf ros-melodic-rqt-action ros-melodic-rqt-bag
ros-melodic-rqt-bag-plugins ros-melodic-rqt-common-plugins ros-melodic-rqt-console
ros-melodic-rqt-dep ros-melodic-rqt-graph ros-melodic-rqt-gui ros-melodic-rqt-gui-cpp
ros-melodic-rqt-gui-py ros-melodic-rqt-image-view ros-melodic-rqt-launch
ros-melodic-rqt-logger-level ros-melodic-rqt-moveit ros-melodic-rqt-msg
ros-melodic-rqt-nav-view ros-melodic-rqt-plot ros-melodic-rqt-pose-view
ros-melodic-rqt-publisher ros-melodic-rqt-py-common ros-melodic-rqt-py-console
ros-melodic-rqt-reconfigure ros-melodic-rqt-robot-dashboard
ros-melodic-rqt-robot-monitor ros-melodic-rqt-robot-plugins
ros-melodic-rqt-robot-steering ros-melodic-rqt-runtime-monitor ros-melodic-rqt-rviz
ros-melodic-rqt-service-caller ros-melodic-rqt-shell ros-melodic-rqt-srv
ros-melodic-rqt-tf-tree ros-melodic-rqt-top ros-melodic-rqt-topic ros-melodic-rqt-web
ros-melodic-rviz ros-melodic-rviz-plugin-tutorials ros-melodic-rviz-python-tutorial
ros-melodic-self-test ros-melodic-sensor-msgs ros-melodic-shape-msgs
ros-melodic-simulators ros-melodic-smach ros-melodic-smach-msgs ros-melodic-smach-ros
ros-melodic-smclib ros-melodic-stage ros-melodic-stage-ros ros-melodic-std-msgs
ros-melodic-std-srvs ros-melodic-stereo-image-proc ros-melodic-stereo-msgs
ros-melodic-tf ros-melodic-tf-conversions ros-melodic-tf2 ros-melodic-tf2-eigen
ros-melodic-tf2-geometry-msgs ros-melodic-tf2-kdl ros-melodic-tf2-msgs
ros-melodic-tf2-py ros-melodic-tf2-ros ros-melodic-theora-image-transport
ros-melodic-topic-tools ros-melodic-trajectory-msgs ros-melodic-transmission-interface
ros-melodic-turtle-actionlib ros-melodic-turtle-tf ros-melodic-turtle-tf2
ros-melodic-turtlesim ros-melodic-urdf ros-melodic-urdf-parser-plugin
ros-melodic-urdf-sim-tutorial ros-melodic-urdf-tutorial ros-melodic-urdfdom-py
ros-melodic-usb-cam ros-melodic-vision-opencv
ros-melodic-visualization-marker-tutorials ros-melodic-visualization-msgs
ros-melodic-visualization-tutorials ros-melodic-viz ros-melodic-webkit-dependency
ros-melodic-xacro ros-melodic-xmlrpcpp software-properties-common
software-properties-gtk steam-launcher systemd systemd-coredump systemd-sysv
teamviewer udev xserver-common xserver-xorg-core
302 to upgrade, 5 to newly install, 12 to remove and 0 not to upgrade.
Careful, the CUDA packages Nvidia supplied depend upon an obsolete Nvidia driver, probably 418. When you re-installed the 440 drivers, the 418 got removed and all dependencies got marked for removal -- that's all the cuda files. I'd immediately back-up the /usr/local/cuda-10.1 dir, which is an autoremove from disappearing. For an original CUDA install of the Nvidia supplied release (not the older one supplied in the standard repos), I'd suggest avoiding the package manager entirely by just unpacking the deb file (and the content deb files), not installing anything. For your situation (just like what I went through), I backed up the /usr/local/cuda-10.1 directory, ran the autoremove (which deleted the ...cuda-10.1), and restored the backed up files. Look at
and individually purge the cuda packages not in the "ii" state (all of them but 3). I am left with nvidia-cuda-dev, libcdart10.1, and cuda-repo-ubuntu1804-10-1-local-10.1.243-418.87.00. No more package manager complaints, and kernel updates will get the new Nvidia driver build automatically, as they should.