Updating the CUDA Linux GPG Repository Key

I run sudo apt update && sudo apt full-upgrade -y every day. Today it failed for an CUDA related reason that I think is related to this key rotation. Could anyone guide me on resolving this issue? I can’t update or install new packages now.

I followed the steps in the blog:

sudo apt-key del 7fa2af80
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_1.0-1_all.deb

Every time I run sudo apt-key del 7fa2af80 I get this output:

Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK

I’m concerned that I can’t update due to apt-key deprecation or that I haven’t deleted and updated they older key fast enough. I’m also concerned the problem with the MergeList is due to something at the file /var/lib/apt/lists/developer.download.nvidia.com_compute_cuda_repos_ubuntu2204_x86%5f64_Packages and wonder if there is a way I can reset that file somehow.

$ sudo apt update
Hit:1 http://us.archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://security.ubuntu.com/ubuntu jammy-security InRelease               
Hit:3 http://us.archive.ubuntu.com/ubuntu jammy-updates InRelease              
Hit:4 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64  InRelease
Hit:5 http://us.archive.ubuntu.com/ubuntu jammy-backports InRelease            
Hit:6 https://repo.nordvpn.com/deb/nordvpn/debian stable InRelease             
Hit:7 https://ppa.launchpadcontent.net/yubico/stable/ubuntu jammy InRelease    
Reading package lists... Error!                            
W: https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/developer.download.nvidia.com_compute_cuda_repos_ubuntu2204_x86%5f64_Packages
E: The package lists or status file could not be parsed or opened.
1 Like