How to upgrade to Ubuntu 20.04 while keeping lambda stack?

Hello,

I apologize in advance if this post doesn’t meet the quality standards for inclusion. I did try to find a post asking this question but after spending some time trying to read posts I’m still not sure how to proceed.

I purchased a lambda labs laptop with Ubuntu and lambda stack from Lambda Labs back in the day (2018? I would have to look it up).

I’m not sure how to upgrade it to Ubuntu 20.04.

Here is some copy pasted output:

senecawolf@tensorbook:~$ sudo apt-get update && sudo apt-get dist-upgrade
[sudo] password for senecawolf: 
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:3 http://packages.microsoft.com/repos/code stable InRelease                
Hit:4 http://us.archive.ubuntu.com/ubuntu bionic InRelease                     
Get:5 https://packages.cloud.google.com/apt cloud-sdk InRelease [6,751 B]      
Hit:6 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease             
Get:2 https://brave-browser-apt-release.s3.brave.com stable InRelease [4,317 B]
Hit:7 http://archive.lambdalabs.com/ubuntu bionic InRelease                    
Hit:8 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease           
Hit:9 http://security.ubuntu.com/ubuntu bionic-security InRelease        
Err:2 https://brave-browser-apt-release.s3.brave.com stable InRelease
  The following signatures were invalid: EXPKEYSIG A8580BDC82D3DC6C Brave Software <support@brave.com>
Fetched 11.1 kB in 2s (5,904 B/s)
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://brave-browser-apt-release.s3.brave.com stable InRelease: The following signatures were invalid: EXPKEYSIG A8580BDC82D3DC6C Brave Software <support@brave.com>
W: Failed to fetch https://brave-browser-apt-release.s3.brave.com/dists/stable/InRelease  The following signatures were invalid: EXPKEYSIG A8580BDC82D3DC6C Brave Software <support@brave.com>
W: Some index files failed to download. They have been ignored, or old ones used instead.
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:
  libllvm9 libllvm9:i386 libnvidia-cfg1-440 libnvidia-cfg1-450
  libnvidia-cfg1-455 libnvidia-cfg1-460 libnvidia-cfg1-470
  libnvidia-common-440 libnvidia-common-450 libnvidia-common-455
  libnvidia-common-460 libnvidia-common-470 libnvidia-compute-440
  libnvidia-compute-440:i386 libnvidia-compute-450 libnvidia-compute-450:i386
  libnvidia-compute-455 libnvidia-compute-455:i386 libnvidia-compute-460
  libnvidia-compute-460:i386 libnvidia-compute-470 libnvidia-compute-470:i386
  libnvidia-decode-440 libnvidia-decode-440:i386 libnvidia-decode-450
  libnvidia-decode-450:i386 libnvidia-decode-455 libnvidia-decode-455:i386
  libnvidia-decode-460 libnvidia-decode-460:i386 libnvidia-decode-470
  libnvidia-decode-470:i386 libnvidia-encode-440 libnvidia-encode-440:i386
  libnvidia-encode-450 libnvidia-encode-450:i386 libnvidia-encode-455
  libnvidia-encode-455:i386 libnvidia-encode-460 libnvidia-encode-460:i386
  libnvidia-encode-470 libnvidia-encode-470:i386 libnvidia-extra-440
  libnvidia-extra-440:i386 libnvidia-extra-450 libnvidia-extra-450:i386
  libnvidia-extra-455 libnvidia-extra-455:i386 libnvidia-extra-460
  libnvidia-extra-460:i386 libnvidia-extra-470 libnvidia-extra-470:i386
  libnvidia-fbc1-440 libnvidia-fbc1-440:i386 libnvidia-fbc1-450
  libnvidia-fbc1-450:i386 libnvidia-fbc1-455 libnvidia-fbc1-455:i386
  libnvidia-fbc1-460 libnvidia-fbc1-460:i386 libnvidia-fbc1-470
  libnvidia-fbc1-470:i386 libnvidia-gl-440 libnvidia-gl-440:i386
  libnvidia-gl-450 libnvidia-gl-450:i386 libnvidia-gl-455
  libnvidia-gl-455:i386 libnvidia-gl-460 libnvidia-gl-460:i386
  libnvidia-gl-470 libnvidia-gl-470:i386 linux-hwe-5.4-headers-5.4.0-70
  linux-hwe-5.4-headers-5.4.0-71 linux-hwe-5.4-headers-5.4.0-72
  nvidia-compute-utils-440 nvidia-compute-utils-450 nvidia-compute-utils-455
  nvidia-compute-utils-460 nvidia-compute-utils-470 nvidia-dkms-440
  nvidia-dkms-450 nvidia-dkms-455 nvidia-dkms-460 nvidia-dkms-470
  nvidia-kernel-common-460 nvidia-kernel-common-470 nvidia-kernel-source-460
  nvidia-kernel-source-470 nvidia-utils-440 nvidia-utils-450 nvidia-utils-455
  nvidia-utils-460 nvidia-utils-470 python3-crcmod shim
  xserver-xorg-video-nvidia-440 xserver-xorg-video-nvidia-450
  xserver-xorg-video-nvidia-455 xserver-xorg-video-nvidia-460
  xserver-xorg-video-nvidia-470
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
senecawolf@tensorbook:~$ lsb_release -a 
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.6 LTS
Release:	18.04
Codename:	bionic
senecawolf@tensorbook:~$

Try running the command: sudo do-release-upgrade

For more information, see: https://manpages.ubuntu.com/manpages/bionic/man8/do-release-upgrade.8.html

Let us know the results!

Here is my output:

Reading cache

Checking package manager
Reading package lists... Done
Building dependency tree        
Reading state information... Done
Hit http://us.archive.ubuntu.com/ubuntu bionic InRelease                                                                                                                                                          
Get:1 https://brave-browser-apt-release.s3.brave.com stable InRelease [4,316 B]                                                                                                                                   
Hit http://packages.microsoft.com/repos/code stable InRelease                                                                                                                                                     
Hit https://dl.google.com/linux/chrome/deb stable InRelease                                                                                                                                                       
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]                                                                                                                                       
Hit http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease                                                                                                                                                  
Hit https://packages.microsoft.com/repos/ms-teams stable InRelease                                                                                                                                                
Hit https://packages.cloud.google.com/apt cloud-sdk InRelease                                                                                                                                                     
Hit http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease                                                                                                                                                
Hit http://archive.lambdalabs.com/ubuntu bionic InRelease                                                                                                                                                         
Hit http://ppa.launchpad.net/serge-rider/dbeaver-ce/ubuntu bionic InRelease                                                                                                                                       
Err https://brave-browser-apt-release.s3.brave.com stable InRelease                                                                                                                                               
  The following signatures were invalid: EXPKEYSIG A8580BDC82D3DC6C Brave Software <support@brave.com>                                                                                                            
Fetched 93.0 kB in 0s (0 B/s)                                                                                                                                                                                     
Reading package lists... Done    
Building dependency tree          
Reading state information... Done

Checking for installed snaps

Calculating snap size requirements

Updating repository information

Third party sources disabled 

Some third party entries in your sources.list were disabled. You can 
re-enable them after the upgrade with the 'software-properties' tool 
or your package manager. 

To continue please press [ENTER]


Hit http://us.archive.ubuntu.com/ubuntu focal InRelease                                                                                                                                                           
Get:1 https://brave-browser-apt-release.s3.brave.com stable InRelease [4,316 B]                                                                                                                                   
Hit https://packages.cloud.google.com/apt cloud-sdk InRelease                                                                                                                                                     
Hit http://us.archive.ubuntu.com/ubuntu focal-updates InRelease                                                                                                                                                   
Hit http://us.archive.ubuntu.com/ubuntu focal-backports InRelease                                                                                                                                                 
Err https://brave-browser-apt-release.s3.brave.com stable InRelease                                                                                                                                               
  The following signatures were invalid: EXPKEYSIG A8580BDC82D3DC6C Brave Software <support@brave.com>                                                                                                            
Hit http://security.ubuntu.com/ubuntu focal-security InRelease                                                                                                                                                    
Fetched 4,316 B in 0s (0 B/s)                                                                                                                                                                                     
Get:1 https://brave-browser-apt-release.s3.brave.com stable InRelease [4,316 B]                                                                                                                                   
Hit http://us.archive.ubuntu.com/ubuntu focal InRelease                                                                                                                                                           
Hit http://security.ubuntu.com/ubuntu focal-security InRelease                                                                                                                                                    
Hit http://us.archive.ubuntu.com/ubuntu focal-updates InRelease                                                                                                                                                   
Hit https://packages.cloud.google.com/apt cloud-sdk InRelease                                                                                                                                                     
Err https://brave-browser-apt-release.s3.brave.com stable InRelease                                                                                                                                               
  The following signatures were invalid: EXPKEYSIG A8580BDC82D3DC6C Brave Software <support@brave.com>                                                                                                            
Hit http://us.archive.ubuntu.com/ubuntu focal-backports InRelease                                                                                                                                                 
Fetched 4,316 B in 0s (0 B/s)                                                                                                                                                                                     
Get:1 https://brave-browser-apt-release.s3.brave.com stable InRelease [4,316 B]                                                                                                                                   
Hit http://us.archive.ubuntu.com/ubuntu focal InRelease                                                                                                                                                           
Hit http://security.ubuntu.com/ubuntu focal-security InRelease                                                                                                                                                    
Hit https://packages.cloud.google.com/apt cloud-sdk InRelease                                                                                                                                                     
Hit http://us.archive.ubuntu.com/ubuntu focal-updates InRelease                                                                                                                                                   
Hit http://us.archive.ubuntu.com/ubuntu focal-backports InRelease                                                                                                                                                 
Err https://brave-browser-apt-release.s3.brave.com stable InRelease                                                                                                                                               
  The following signatures were invalid: EXPKEYSIG A8580BDC82D3DC6C Brave Software <support@brave.com>                                                                                                            
Fetched 4,316 B in 0s (0 B/s)                                                                                                                                                                                     

Error during update 

A problem occurred during the update. This is usually some sort of 
network problem, please check your network connection and retry. 


Restoring original system state

Aborting
Reading package lists... Done    
Building dependency tree          
Reading state information... Done
=== Command terminated with exit status 1 (Sun Jul 10 14:03:25 2022) ===

It always has complaints about the Brave browser (experimentally removed Chrome to see if I could use a similar process to remove Brave… I could easily remove & reinstall Chrome but have not had success removing Brave).

And, it always says,

A problem occurred during the update. This is usually some sort of
network problem, please check your network connection and retry.

And it always has the complaint about the sources list:

Some third party entries in your sources.list were disabled. You can
re-enable them after the upgrade with the ‘software-properties’ tool
or your package manager.

I finally did what was on:

but that didn’t fully work so I did what was said here as well:

And then doing sudo do-release-upgrade seems to have worked… now I’m on Ubuntu 20.04… hopefully I still have Lambda Stack (?) and everything works…

Just ask if you run into any issues.

You can check with:

  • apt list --installed | grep lambda
1 Like

Thanks so much! I really appreciate it. I am having questions now that I’m on Ubuntu 20.04 but I’m thinking I probably need to do a new thread.

Maybe I should post here after all… I don’t know.

After upgrading to Ubuntu 20.04 I am receiving a popup window that is telling me I have 225 packages that are obsolete and asks me whether I want to keep or remove them. A whole bunch are libnvidia-… & I didn’t specifically check yet but I get a number of libnvidia-… packages when I do apt list --installed | grep lambda as well. I’m wondering how I can check that I’m back in business.

You can run apt-get autoremove to remove unnecessary packages from your system. For more information, see:

https://manpages.ubuntu.com/manpages/focal/man8/apt-get.8.html

autoremove (and the auto-remove alias since 1.1)
autoremove is used to remove packages that were automatically installed to satisfy
dependencies for other packages and are now no longer needed.

From browsing these forums it sounds like people have had severe issues after running autoremove! I have been avoiding doing that! Can somebody who knows for certain please chime in? & thank you for your help Cody!

I finally did sudo apt-get update && sudo apt-get upgrade && sudo apt-get autoremove and so far things seem to be working fine.

I’m sure I’ve messed some things up & not sure how to fix them.

For example:

Yes, NVIDIA packages I would clean up and reinstall commonly, especially up upgrades between major versions like Ubuntu 18.04 → 20.04 LTS.

It looks like this was a desktop install the "" is just a line continuation, this should be all one line effectively. Also since you may be in a ‘unknown state’ after the Ubuntu update.

sudo rm -f /etc/apt/sources.list.d/{graphics,nvidia,cuda}*;
COLUMNS=200 dpkg -l | awk \ ‘/cuda|lib(accinj64|cu(blas|dart|dnn|fft|inj|pti|rand|solver|sparse)|magma|nccl|npp|nv[^p])|nv(idia|ml)|tensor(flow|board)|torch/{ print $2 }’ |
sudo xargs -or apt -y remove --purge

Then to reinstall Lambda Stack
LAMBDA_REPO=$(mktemp) &&
wget -O${LAMBDA_REPO} https://lambdalabs.com/static/misc/lambda-stack-repo.deb &&
sudo dpkg -i ${LAMBDA_REPO} && rm -f ${LAMBDA_REPO} &&
sudo apt-get -y update && sudo apt-get -y install lambda-stack-cuda

That didn’t seem to work:

~$ LAMBDA_REPO=$(mktemp) &&
wget -O${LAMBDA_REPO} https://lambdalabs.com/static/misc/lambda-stack-repo.deb 2 &&
sudo dpkg -i ${LAMBDA_REPO} && rm -f ${LAMBDA_REPO} &&
sudo apt-get -y update && sudo apt-get -y install lambda-stack-cuda
--2023-08-14 16:39:51--  https://lambdalabs.com/static/misc/lambda-stack-repo.deb
Resolving lambdalabs.com (lambdalabs.com)... 199.60.103.50, 199.60.103.150
Connecting to lambdalabs.com (lambdalabs.com)|199.60.103.50|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3588 (3.5K) [application/x-debian-package]
Saving to: ‘/tmp/tmp.hcDhXTtavY’

/tmp/tmp.hcDhXTtavY                              100%[=======================================================================================================>]   3.50K  --.-KB/s    in 0s

2023-08-14 16:39:52 (36.5 MB/s) - ‘/tmp/tmp.hcDhXTtavY’ saved [3588/3588]

--2023-08-14 16:39:52--  http://2/
Resolving 2 (2)... 0.0.0.2
Connecting to 2 (2)|0.0.0.2|:80...

But doing the one sayd in post REINSTALL Lambda Stack worked out flawlessly

That is from a few years ago but works for removal, and the script should be used for the install.
How do I remove and reinstall Lambda Stack? | Lambda Docs

Is the instructions. It will work for Ubuntu 20.04 LTS or Ubuntu 22.04 LTS (either desktop or server). There could be other packages that were manually installed the conflict, or were configured to be held ‘apt-mark showhold’ for example.

It likely would require going through the ‘dpkg --list’ to see what is installed and conflicts. But this should work unless there are other conflicts.

Also it may be what you mean by ‘That didn’t seem to work’.
$ nvidia-smi
*That is the test

  • PyTorch, TensorFlow - those are often local environment issues (pip).