Notice: Ubuntu 22.04 repository MergeList corruption

Hi there,
As per comment: Updating the CUDA Linux GPG Repository Key - #38 by MicahParks (thank you @MicahParks)

There was a problem with one posting on June 6th, affecting users of the CUDA repository on Ubuntu 22.04 (x86_64) between the period 2022-06-07T00:00:00Z2022-06-07T20:30:00Z .

This repository metadata issue has been resolved, however machines that had run $ sudo apt-get update during the affected period may still have a malformed list file on their filesystem.

$ sudo apt-get update
Hit:1 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64  InRelease
Hit:2 http://archive.ubuntu.com/ubuntu jammy InRelease                                                     
Get:3 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]                                  
Get:4 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [109 kB]
Get:5 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB]
Get:6 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [209 kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [348 kB]
Get:8 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [134 kB]
Fetched 1011 kB in 2s (485 kB/s)                        
Reading package lists... Error!
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.lz4
E: The package lists or status file could not be parsed or opened.

To resolve this error delete the malformed MergeList files

$ sudo rm -v /var/lib/apt/lists/*cuda_repos*
/var/lib/apt/lists/developer.download.nvidia.com_compute_cuda_repos_ubuntu2204_x86%5f64_InRelease
/var/lib/apt/lists/developer.download.nvidia.com_compute_cuda_repos_ubuntu2204_x86%5f64_Packages.lz4

Then fetch updated metadata

$ sudo apt update
Get:1 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64  InRelease [1581 B]
Get:2 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64  Packages [50.3 kB]
Hit:3 http://archive.ubuntu.com/ubuntu jammy InRelease                    
Hit:4 http://security.ubuntu.com/ubuntu jammy-security InRelease          
Hit:5 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:6 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Fetched 51.9 kB in 0s (111 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
9 packages can be upgraded. Run 'apt list --upgradable' to see them.
2 Likes