Offline for a few years... update needed!

Your current PureOS installation is not at the moment connected to the https://repo.puri.sm/ and therefore this easy output. Without that sudo apt update works flawlessly there is no positive move to anything. Afterwards, it is to expect that other issues will pop up there as well. I’m just not sure if you will be able to catch PureOS train again.

Ok, I will try this later tonight and report back tomorrow.
Thanks again, @Quarnero, for your kind, patient and detailed help!

1 Like

Just downloaded it now! :slight_smile:

Egads, “a lot”? I don’t know what all they might be! To the best of my memory, I’ve only added about a dozen or so applications and a couple of add-ons.

[quote=“Quarnero, post:29, topic:17645”]
put packages.list file aside (including all other backups as @Caliga kindly recommended here) right away[/quote]

Sorry, you lost me here. How do I put packages.list file aside?

I read that post. Thanks! You specified aptitude though, and I don’t seem to have that on my system.

Thanks for the forewarning. Yes, I figured that’d be the case!

Copy them to a USB drive or other suitable location because if you reformat or reinstall, you’ll lose them.

You can use apt.

My two cents: sounds like you’re prepping to wipe your phone and start over anyway. Once you’re done backing things up, try Dwaff’s suggestion and see if you can get the certificates to do your upgrade. Afterward we’ll either know that A) it worked and you can upgrade from ancient to current, or B) it failed and reinstallation is the answer.

Yes, I understand that I have to copy my important data to an external USB drive prior to the clean install.
What I don’t know is if the packages.list Quarnero referred to is a file (like the sources.list) or a folder containing all packages or…?
Could you please tell me what the command would be to do this?
Sorry if this is a dumdum question!

Actually a Librem15 laptop, not a phone. :slight_smile:

Do you mean this?

Thanks, @Gavaudan!

From this post mentioned earlier:

Yes. Then when you’re done, put the s back.

2 Likes

I just went over that post again to try to get a grasp of it, and it looks/sounds very complicated. :confounded:
Do I just enter this command verbatim into Terminal? What will it do?
dpkg --get-selections | awk '!/deinstall|purge|hold/ {print $1}' > /home/purism/201230pkg.list

Sorry, I don’t understand the following…
Now someone can edit this pkg.list (.list) file and remove or add whatever preferred in order **to** or **not to** (re)install/restore very same packages again with:
xargs -a "201230pkg.list" apt-get install
or
xargs -a "201230pkg.list" aptitude install --without-recommends

I suspect that I won’t want to edit the package.list. So, I’ll likely not need either of those two commands. I simply wish to be able to put everything that I’ve copied back in their proper places after the (hopefuly successful) Byzantium installation… with the understanding that some might not work anymore due to obsolescence.

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.

3 Likes

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 https://repo.pureos.net/pureos byzantium main
deb https://repo.pureos.net/pureos byzantium-updates main
deb https://repo.pureos.net/pureos 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!

Hi!

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:

screenshot070422
screenshot_070422b

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 repo.pureos.net”… 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.

3 Likes

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:

2 Likes

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.

Hi!

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 http://repo.puri.sm/pureos amber InRelease
Hit:2 http://repo.pureos.net/pureos amber InRelease
Hit:3 http://repo.pureos.net/pureos amber-updates InRelease
Hit:4 http://repo.pureos.net/pureos 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 http://repo.pureos.net/pureos amber InRelease Could not resolve 'repo.pureos.net'
Err:2 http://repo.puri.sm/pureos amber InRelease Could not resolve 'repo.puri.sm'
Err:3 http://repo.pureos.net/pureos amber-updates InRelease Could not resolve 'repo.pureos.net'
Err:4 http://repo.pureos.net/pureos amber-security InRelease Could not resolve 'repo.pureos.net'
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 http://repo.pureos.net/pureos/dists/amber/InRelease Could not resolve 'repo.pureos.net'
W: Failed to fetch http://repo.pureos.net/pureos/dists/amber-updates/InRelease Could not resolve 'repo.pureos.net'
W: Failed to fetch http://repo.pureos.net/pureos/dists/amber-security/InRelease Could not resolve 'repo.pureos.net'
W: Failed to fetch http://repo.puri.sm/pureos/dists/amber/InRelease Could not resolve 'repo.puri.sm'
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.