Tried to do a system update, manjaro started using all resources and the computer is freezing

Hello community!

I hadn’t updated the system for a couple of weeks. I opened a terminal and typed sudo pacman -Syyuw. I got through a question about replacing one package with another, got a second question and that’s when things started to go wrong.

The only other application I opened at that point was the monitor and saw that CPU and RAM shot up through the roof. Computer was stuck and swap was ramping up.

I was know relying on the HDD swap and with much patience, I managed to open a tty and run top.

In top I can see a lot of pamac processes, like 10 of them at least. I didn’t manage to start downloading any packages, I only got through the core, extra, community, multilib update.

Is there any way that I can gracefully shut down pacman or the pamac processes?

Hello,

Always pay attention and not add typos in terminal commands or in topics, because can lead to many misunderstandings.

If there was no downloaded package, then you can safely reboot the machine. A problem with updating and interrupting the update is when pamac or pacman will start actually doing the update on the packages.

You might have to run, after reboot
sudo rm /var/lib/pacman/db.lck

and then you can also make sure all is fine by
sudo pacman-mirrors -f5 && sudo pacman -Syyu

1 Like

Thank you. I shut it down and let it rest, because the HDD felt like it was overheating.

I’ll try the full update a bit later on a tty.

Yes. This wasn’t a typo though, I do add the w option in -Syyu in order to just download all packages first, while I’m still in the graphical environment. Afterwards, I pop into a tty to install the updates with -Su.

EDIT: I’m on tty downloading packages now, all seems to be going well. I didn’t need to remove any db.lck, but I refreshed the mirrors just in case. Thank you for the prompt reply, much appreciated.

Glad you got the updates, and not to be argumentative, but to download a package without installing it:

sudo pacman -Sw *package_name*

is the right command,
but when using -Syyuw most likely the update will start right away after downloading the packages …

1 Like

That makes sense. But apparently from my daily use of the -Syyuw command, what it does is refresh core, extra, community, multilib and then only download packages. Always good to learn of a cleaner command that gets the job done though!

I’m coming across invalid keyrings during the update I’m doing and it fails.

I run sudo pacman-key --refresh-keys. Seeing lots of errors. Rerun pacman -Syyuw, still fails.

Should I try something like this

sudo pacman -Sy archlinux-keyring manjaro-keyring
sudo pacman-key --populate archlinux manjaro

or this

sudo rm -r /etc/pacman.d/gnupg
sudo pacman-key --init
sudo pacman-key --populate manjaro
sudo pacman-key --populate archlinux
sudo pacman -Syvv manjaro-keyring

?

EDIT:
Found this wiki guide.

I checked Time and Date in Manjaro Settings Manager. It is identical to my smartphone’s time and date.
However, in Windows (dual boot system), I recently saw that the time is incorrect.

I will proceed with the wiki guide.

I don’t understand what fixation Manjaro users have to use double ‘y’ non-stop (and is also encouraged in plenty of tutorials) - it is NOT needed unless you just switched branches. Pacman isn’t stupid, it knows if mirror was updated.

And nothing wrong if you just download packages first with ‘-w’, just keep in mind that you need to update whole system afterwards before you install any separate packages, or else you might end up in a partial upgrade state (as if you did ‘-Sy’).

1 Like

I have a question on this step:

mkdir -pv $HOME/.cache/pkg/ && sudo pacman -Syw archlinux-keyring manjaro-keyring --cachedir $HOME/.cache/pkg/

I am being asked whether or not I want to delete the downloaded keyring pacakges. Default is Yes, but I should obviously choose no if I want to install the packages, right?

EDIT: I chose no and completed the guide, while also clearing out cache and unused sync databases at the end. Refreshed mirrors again and run pacman -Syyu. Keyrings checked out alright this time. Upgrade finished successfully.

Do I also have to run these commands to add more keys now and update all keys?

sudo pacman-key --populate archlinux manjaro
sudo pacman-key --refresh-keys

Well, it is kind of confusing which one is the safer way. It was recommended to me that I use -Syyu when I refresh mirrors and I suppose I should be using it when trying to solve issues like the one I faced today.

I’m also not sure what happens after I manually refresh the mirror list like I did today. Do I have to refresh the mirrors each time I update from now on, or does pacman take over and updates the mirrors automatically (I’ve heard that’s what pacman does by default)?

If -Syu is reliable and won’t lead to any problems with partial updates, and if it doesn’t matter anymore that I’ve updated the mirror list, I’ll try updating with -Sw and -Syu, as suggested.

EDIT1: I think I’ve found the answer to my question here.

EDIT2: Returned to add that for downloading all packages to update the system, the command sudo pacman -Sw does not work, because a target (package name) has to also be specified.

The keys should update automatically when there is an update in the archlinux-keyring and manjaro-keyring. You only have to manually intervene when you get errors about. In only happened to me once in almost 3 years, so i do not think is the case of “always” and issue … :grinning:

What’s confusing? Read man pacman. It tells you exactly what any flag/switch does. And this isn’t about safety but pointless re-downloading of databases you already have.

EDIT: Just saw your edit. :stuck_out_tongue:

1 Like

I didn’t quite understand you there. I got errors about keyrings, but they were (at least partially) resolved and I was able to update. To conclude the solution and avoid the same thing happening on my next update, should I also run the commands to repopulate and refresh the keyrings? Because others 1, 2 have suggested running these commands too, when we try to solve a stubborn keyring problem.

Truth be told, it happened last time I updated too if I remember correctly, but it was an easier fix, like only refreshing the keys or something.
The common denominator in my most recent updates was that I hadn’t updated the system for a few weeks. Apparently, manjaro doesn’t like to be stood up.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.