如何卸载/删除 Server 22.04.1 LTS 上对 nVidia/cuda 的所有引用

如何卸载/删除 Server 22.04.1 LTS 上对 nVidia/cuda 的所有引用

服务器用于文件共享和 Plex。现在正在清理通过未知方式安装 nVidia/CUDA 失败/部分成功的尝试。尚未安装 nVidia 硬件。登录、apt update 和 apt upgrade 的结果如下:

Welcome to Ubuntu 22.04.1 LTS (GNU/Linux 5.15.0-48-generic x86_64)

 * Documentation:  https://help.ubuntu.com  * Management:    
https://landscape.canonical.com  * Support:       
https://ubuntu.com/advantage

  System information as of Mon Oct 10 01:46:31 PM UTC 2022

  System load:  0.0                Temperature:             38.0 C  
Usage of /:   17.4% of 97.87GB   Processes:               200   Memory
usage: 52%                Users logged in:         0   Swap usage:  
0%                 IPv4 address for enp5s0: 192.168.5.6

 * Super-optimized for small spaces - read how we shrank the memory   
footprint of MicroK8s to make it the smallest full K8s around.

   https://ubuntu.com/blog/microk8s-memory-optimisation

0 updates can be applied immediately.

sudo apt update

Get:1 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 InRelease [1,581 B]
Hit:2 http://us.archive.ubuntu.com/ubuntu jammy InRelease
Get:3 http://us.archive.ubuntu.com/ubuntu jammy-updates InRelease [114 kB]
Err:1 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
Get:4 http://us.archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8kB]
Get:5 http://us.archive.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [631 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu jammy-updates/main Translation-en [146 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 c-n-f Metadata [8,964 B]
Get:9 http://us.archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [373 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu jammy-updates/restricted Translation-en [57.4 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [428 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu jammy-updates/universe Translation-en [108 kB]
Reading package lists... Done
W: GPG error: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64
InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
E: The repository 'http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default
N: See apt-secure(8) manpage for repository creation and user configuration details.

sudo apt upgrade

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
Try Ubuntu Pro beta with a free personal subscription on up to 5 machines.
Learn more at https://ubuntu.com/pro
The following NEW packages will be installed:   linux-headers-5.15.0-50
linux-headers-5.15.0-50-generic linux-image-5.15.0-50-generic
linux-modules-5.15.0-50-generic linux-modules-extra-5.15.0-50-generic
The following packages will be upgraded:   linux-generic
linux-headers-generic linux-image-generic linux-libc-dev
4 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 115 MB of archives. After this operation, 584 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-modules-5.15.0-50-generic amd64 5.15.0-50.56 [22.7 MB] 
Get:2 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-image-5.15.0-50-generic amd64 5.15.0-50.56 [11.4 MB] 
Get:3 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-modules-extra-5.15.0-50-generic amd64 5.15.0-50.56 [64.0 MB]
Get:4 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-generic amd64 5.15.0.50.50 [1,696 B]
Get:5 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-image-generic amd64 5.15.0.50.50 [2,538 B]
Get:6 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-headers-5.15.0-50 all 5.15.0-50.56 [12.3 MB]
Get:7 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-headers-5.15.0-50-generic amd64 5.15.0-50.56 [2,847 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-headers-generic amd64 5.15.0.50.50 [2,392 B]
Get:9 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-libc-dev amd64 5.15.0-50.56 [1,319 kB]
Fetched 115 MB in 3s (39.2 MB/s)
Selecting previously unselected package linux-modules-5.15.0-50-generic.
(Reading database ... 141711 files and directories currently installed.)
Preparing to unpack .../0-linux-modules-5.15.0-50-generic_5.15.0-50.56_amd64.deb ...
Unpacking linux-modules-5.15.0-50-generic (5.15.0-50.56) ...
Selecting previously unselected package linux-image-5.15.0-50-generic.
Preparing to unpack .../1-linux-image-5.15.0-50-generic_5.15.0-50.56_amd64.deb...
Unpacking linux-image-5.15.0-50-generic (5.15.0-50.56) ...
Selecting previously unselected package linux-modules-extra-5.15.0-50-generic.
Preparing to unpack.../2-linux-modules-extra-5.15.0-50-generic_5.15.0-50.56_amd64.deb ...
Unpacking linux-modules-extra-5.15.0-50-generic (5.15.0-50.56) ...
Preparing to unpack .../3-linux-generic_5.15.0.50.50_amd64.deb ...
Unpacking linux-generic (5.15.0.50.50) over (5.15.0.48.48) ...
Preparing to unpack .../4-linux-image-generic_5.15.0.50.50_amd64.deb...
Unpacking linux-image-generic (5.15.0.50.50) over (5.15.0.48.48)...
Selecting previously unselected package linux-headers-5.15.0-50.
Preparing to unpack .../5-linux-headers-5.15.0-50_5.15.0-50.56_all.deb...
Unpacking linux-headers-5.15.0-50 (5.15.0-50.56) ...
Selecting previously unselected package linux-headers-5.15.0-50-generic.
Preparing to unpack.../6-linux-headers-5.15.0-50-generic_5.15.0-50.56_amd64.deb ...
Unpacking linux-headers-5.15.0-50-generic (5.15.0-50.56) ...
Preparing to unpack .../7-linux-headers-generic_5.15.0.50.50_amd64.deb ...
Unpacking linux-headers-generic (5.15.0.50.50) over (5.15.0.48.48) ...
Preparing to unpack .../8-linux-libc-dev_5.15.0-50.56_amd64.deb ...
Unpacking linux-libc-dev:amd64 (5.15.0-50.56) over (5.15.0-48.54) ...
Setting up linux-headers-5.15.0-50 (5.15.0-50.56) ...
Setting up linux-libc-dev:amd64 (5.15.0-50.56) ...
Setting up linux-headers-5.15.0-50-generic (5.15.0-50.56) ...
/etc/kernel/header_postinst.d/dkms:  *
dkms: running auto installation service for kernel 5.15.0-50-generic

Kernel preparation unnecessary for this kernel. Skipping...

Building module: cleaning build area... unset ARCH; [ ! -h /usr/bin/cc
] && export CC=/usr/bin/gcc; env NV_VERBOSE=1 'make' -j4
NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=5.15.0-50-generic
IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1
SYSSRC=/lib/modules/5.15.0-50-generic/build LD=/usr/bin/ld.bfd
CONFIG_X86_KERNEL_IBT= modules................... cleaning build
area...

nvidia.ko: Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.15.0-50-generic/updates/dkms/

nvidia-modeset.ko: Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.15.0-50-generic/updates/dkms/

nvidia-drm.ko: Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.15.0-50-generic/updates/dkms/

nvidia-uvm.ko: Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.15.0-50-generic/updates/dkms/

nvidia-peermem.ko: Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.15.0-50-generic/updates/dkms/

depmod...    ...done.

Setting up linux-headers-generic (5.15.0.50.50)...
Setting up linux-image-5.15.0-50-generic (5.15.0-50.56) ...
I: /boot/vmlinuz.old is now a symlink to vmlinuz-5.15.0-48-generic
I: /boot/initrd.img.old is now a symlink to initrd.img-5.15.0-48-generic
I: /boot/vmlinuz is now a symlink to vmlinuz-5.15.0-50-generic
I: /boot/initrd.img is now a symlink to initrd.img-5.15.0-50-generic
Setting up linux-modules-5.15.0-50-generic (5.15.0-50.56) ...
Setting up linux-modules-extra-5.15.0-50-generic (5.15.0-50.56) ...
Setting up linux-image-generic (5.15.0.50.50) ...
Setting up linux-generic (5.15.0.50.50) ...
Processing triggers for linux-image-5.15.0-50-generic (5.15.0-50.56) ...
/etc/kernel/postinst.d/dkms:  * dkms: running auto installation
service for kernel 5.15.0-50-generic    ...done.
/etc/kernel/postinst.d/initramfs-tools: update-initramfs:
Generating /boot/initrd.img-5.15.0-50-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-50-generic
Found initrd image: /boot/initrd.img-5.15.0-50-generic
Found linux image: /boot/vmlinuz-5.15.0-48-generic
Found initrd image: /boot/initrd.img-5.15.0-48-generic
Found linux image: /boot/vmlinuz-5.15.0-46-generic
Found initrd image: /boot/initrd.img-5.15.0-46-generic
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry. done
Scanning processes...
Scanning processor microcode...
Scanning linux images...

The processor microcode seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this
host.

问题解决后,计划安装 nVidia 硬件和 Plex 中 GPU 转码所需的适当软件。目前的计划是简单地返回到之前干净的服务器版本。

相关内容