Offline for a few years... update needed!

Yes. Basically, its a command for dpkg to get all the software you have installed, then pipe that list into awk which will clean it up and output the resultant list into a file named 201230pkg.list in the /home/purism directory. If your username isn’t “purism” than change it to what yours actually is.

You can edit the pkg list if you find things you want that aren’t in the list or don’t want that are in the list. Then you can use the “xargs…” line to install everything in the list, say on a newly installed system.


As very last resort, let us have some fun (as only following might help there, and if helps at all before brand new install). Please change your current sources.list to (disable current ones with # in front or remove amber ones completely):
deb byzantium main
deb byzantium-updates main
deb byzantium-security main

Just while in accordance with the current and official PureOS guidance.

Afterwards please type following (preferably connected to the Internet with the Ethernet cable):
sudo apt update
sudo apt install ntpdate
sudo ntpdate-debian
sudo apt update
sudo apt install openssl ca-certificates apt-transport-https
sudo apt install pureos-desktop pureos-gnome pureos-standard pureos-minimal
sudo apt upgrade
sudo apt full-upgrade
sudo apt clean
sudo reboot
sudo apt autoremove

This is simple text (.list) file, standalone one, might be named as preferred, for example: Librem15_installed_green_packages_as_of_20220703.list.

Ok, i just did this and it listed a whole bunch of stuff…
$ dpkg --get-selections

Then, I tried this…
$ awk '!/deinstall|purge|hold/ {print $1}' > /home/purism/201230pkg.list

And it’s been stuck there for about a half an hour. Maybe still working on the file? There is a 201230pkg.list file in home now but it’s 0bytes.

EDIT: I just ended that process with ctrl+c, and then tried the command again, but it stalled too. Did I fumble it somehow??

By the way, your instructions and explanation were super clear. Thanks!


Before we proceed with fun time, here’s what I did this morning and where I am at this point…

I copied my important data to USB. It was just my Desktop, Documents and Downloads because copying the entire home directory failed.

I also tried to copy a few other things that were recommended by others elsewhere (i.e., /etc/, /var/backups, and /var/lib), but they failed due to errors similar to the ones I encountered when trying to do the full copy of my home directory.

Then, I temporarily switched https to http in sources.list, and attempted to update via Software as per @Dwaff’s suggestion, but got these popups:


So, I tried sudo apt update in Terminal instead, and it appeared to have succeeded. So, I switched http back to https, and ran sudo apt upgrade, but got a heap of errors: “Certificate verification failed”, “Unable to connect to”… which ended with this…

E: Unable to fetch some archives, maybe run apt-get update or try with –fix-missing?

So, I tried both of those as well as sudo apt-get upgrade and sudo apt full-upgrade but all failed.

However, I had left the Software window open, and it now said “Updates 20” at the top, and OS Updates was at the top of the list!

Feeling a bit apprehensive. Should I go ahead and hit “download”?

Yes. If you look at the command again, there’s a | between “–get-selections” and “awk”. That character is called a pipe and it directs the output of one command to the input of another. The whole thing is one command and needs to be run on one line.


Aha! I initially tried the whole thing as per your instructions, but then it didn’t seem to do anything (i.e., it just went back to a blinking cursor awaiting a command). So, I thought I misunderstood, and split it into two commands. I didn’t check that first time to see if a file had been generated, yeesh. Just tried the whole thing again, and… hooray, 201230pkg.list. Thank you thank you!

1 Like

Let us do things step-wise, in order to get through upgrade and full-upgrade successfully. Explanation: while http within sources.list connects yours laptop to PureOS packages repository without any issues, when executed sudo apt update next step is not to change anything. Next step is to issue: sudo apt upgrade and sudo reboot. Let us hope that your Librem 15 manages update, upgrade and reboot without any issues (as a first step here).

Please take above as important. This below is helping to understand that partial apt upgrade should work too and only if you like to upgrade (test if it works) certain package only you might execute:

sudo apt update
sudo apt upgrade apt −− this might pull other packages. Either way only available answer would be: Y for Yes.
sudo apt upgrade

You are heading toward:

sudo apt upgrade apt
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
apt is already the newest version (2.2.4).
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Before you proceed just take another look if you transferred all the files that you’ll need again. Good job, stay relaxed. I’m also glad that @Dwaff advice helps on your software/hardware indeed.

1 Like

If the command prompt appears after executing a command, it means it’s finished. :slight_smile:


Mostly my fault. But still and in order to make installed packages.list (same command presented in another format+sudo):

cd /home/user-name/Documents
sudo dpkg --get-selections | awk '!/deinstall|purge|hold/ {print $1}' > Librem15_green_pkg.list

Once needed (otherwise please don’t experiment) and in order to restore previously installed (selected) packages within new/other installation:

xargs -a "Librem15_green_pkg.list" sudo apt install
1 Like

Wowzers, thanks for that detailed step-by-step!
To be extra careful, I just wanted to doublecheck…
By "next step is not to change anything”, did you mean I should not switch back from http to https after sudo apt update and prior to sudo apt upgrade?

1 Like

Yes! And sorry, a priori sorry, about some of my weird English descriptions.


Please no apologies! Your instructions and explanations are very clear.
This process can be a bit overwhelming, and trying to keep all of the different permutations and possibilities straight can make one’s head spin. So, I hope my queries for clarification aren’t too bothersome or long-winded, and I hope that this will be helpful for others in the future. :slightly_smiling_face:

I just tried to start the partial upgrade test you suggested, but got stalled at sudo apt update.

On my previous seemingly successful sudo apt update, I got this:
Hit:1 amber InRelease
Hit:2 amber InRelease
Hit:3 amber-updates InRelease
Hit:4 amber-security InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
528 packages can be upgraded.

However, I got errors this time:
Err:1 amber InRelease Could not resolve ''
Err:2 amber InRelease Could not resolve ''
Err:3 amber-updates InRelease Could not resolve ''
Err:4 amber-security InRelease Could not resolve ''
Reading package lists... Done
Building dependency tree
Reading state information... Done
528 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Failed to fetch Could not resolve ''
W: Failed to fetch Could not resolve ''
W: Failed to fetch Could not resolve ''
W: Failed to fetch Could not resolve ''
W: Some index files failed to download. They have been ignored, or old ones used instead.

??? :disappointed:
Should I still go ahead with the partial sudo apt upgrade apt?
Or should I try your last resort “fun” idea from Post #47?
Or should I just resort to a clean install of Byzantium and subsequent restoration of my Home data?

Thanks again!

It looks like you’re not connected to the internet.

Also the command is “sudo apt upgrade” there’s no second apt.

Hmmm, I was definitely online then, but the signal has been rollercoaster-y highs and lows. So, maybe it sputtered out at some point? I’ll give it another try.

The second “apt” was part of a test partial apt upgrade as per this…

EDIT: Just retried sudo apt update and it worked this time. Yay! Proceeding onwards. Wish me luck! :slight_smile:

1 Like

I do think that you are having working Internet connection so here just some additional test. Please execute:

If above sucessful please refer to this post: Dirty Pipe kernel vulnterability and rename Linux Kernel to: linux-image-5.10.0-15-amd64 (current one) like this:
sudo apt update
sudo apt install linux-image-amd64
sudo apt install linux-image-5.10.0-15-amd64 −− probably not needed.
sudo reboot

I will try that now.
Should I reset to https prior to reboot or at some other point?
Hope that after I do this I won’t have a new paperweight/doorstop and be writing to you from a different computer, hahaha!

1 Like

Oh OK. Never explicitly upgraded apt before so it threw me.

If you’ve successfully upgraded then you should reboot anyway. It won’t matter when you change back to https as long as its before the next update.


Thanks Gavaudan and @Quarnero!
Happy to report that it appears I am making some genuine progress.
After doing a sudo apt full-upgrade, I just checked cat /etc/*-release and it now lists PureOS 9 Amber. This is quite exciting. :smiley:

So, wondering if I should press my luck and proceed with adding Byzantium to sources.list, removing (or disabling) Amber, and then do another sudo apt update and sudo apt upgrade?

Or just bask in the glow of this little success for a few more moments, hahaha!

1 Like

Keep it going!

Do a system backup before proceeding to Byzantium, just in case.

1 Like