[root tip] [How To] Update Manjaro the smart way

TL:DR

  1. Logout
  2. Press CtrlAltF4
  3. Log on to the system console
  4. Execute command sudo pacman -Syu
  5. Execute command pamac update --aur
  6. Execute command reboot

Manjaro updates

Think of the following imaginary situation

When you use your system or shortly after login - a message appears - telling you there is updates available. When you click the message Pamac opens with the updates pane listing 100’s of packages ready to download/install on your system.

Almost per instinct you click the update now - provide your password and the flow begin.

Suddenly your screen goes blank - you wait - nothing happens.

You press CtrlAltF4 to access TTY - nothing happens - you wait - nothing happens.

Without giving much thought to it - you hold the power button until the system powers off and press it again to power on your system - and now you are having a black screen maybe a message … unless your system is not booting at all !

What now? Could the situation have been avoided?

While - of course - there is no guarantee - the following headlines may help you understand what goes on behind the scenes.

  1. Manjaro and AUR
  2. Know your system
  3. What happens when you update
  4. What happens and why when an update stalls
  5. Updating the smart way
  6. Conclusion

Know your system

There is a few packages - which when updated most likely will require a restart. A short list of important system packages which probably requires restart

  • ucode
  • cryptsetup
  • linux
  • nvidia
  • mesa
  • systemd
  • wayland
  • xf86-video
  • xorg

Another part of knowing your system is which foreign packages you have installed. Foreign packages is defined as everything not in the official repository so keeping a list of packages installed by an AUR helper or using makepkg -i will be of help when you update your system.

Before you update - you can query pacman for the list - pipe it to a text file for later referral

pacman -Qm > ~/aur-pkglist.txt && xdg-open aur-pkglist.txt

package download

The way pacman works - using the alpm library - is to download the packages and verify by signatures - and when a package validation fail - the transaction will be not committed.

This ensures no updates are written to the system if the internet connects is severed as the update will be cancelled unless all packages required is available in the local package cache.

pacman hooks

A part of knowing your system is to understand how the alpm library applies the updates.

Many packages - especially system packages - makes use of hooks to process changes during an update.

If a package update is not fully completed - eg. your system loses power during update - the post-update hooks are not executed - and bad things can happen - what actually happens depends on the package and the hooks implemented.

What happens on update?

Most of us has been using Windows and we know from Windows that system files may be locked so the system must be restarted so the file can be replaced with the updated versions.

Due to the modularity of Linux only needed parts of an application is loaded into memory and the rest is loaded on as-needed-basis - and this includes kernel, kernel modules and drivers.

Custom packages

When you build a custom package using an AUR helper, the package is built using the - at build time - available system libraries.

When you update your system - you may be replacing those dependencies with new libraries - and such replacement may cause instability or outright failure of your custom package - especially when your custom packages depends on a specific kernel release.

When you reboot your system after an update the system will use new modules and any application or device relying on a custom kernel module will fail because the module has not been rebuilt.

Only after a successful update and a successful restart you can begin to update your custom modules.

custom themes

Themes is not only a bunch of color definitions and icons.

Gnome (GTK+) and Plasma (QT+) themes is high level code integrating with the tool kit using tool kit specific definitions, code abstraction even javascript.

This makes applications prone to errors when themes are not maintained to match the next release of the tool kit.

Such maintenance may appear tedious but nonetheless - a non maintained theme may break the system - most notably the display manager most notably gdm for Gnome and sddm for Plasma but also toolbars, extensions and plasmoids may exhibit erratic behavior.

What happens when an update stalls?

The following is a simplified description - of what may happen.

When you run huge updates within the graphical environment - whether you use a terminal or a gui package manager - the system may end in a state where it needs to load a specific library at a specific memory address pointing at a specific routine in the library - but due to updates - the library is no longer existing - it has been updated to a never version - and your update stalls.

Updating the smart way

Before major updates, it is wise to - temporarily

  • Gnome
    • disable extensions
    • revert to default shell theme
    • revert to default theme
  • Plasma
    • revert to the default global theme (Breeze/Breath) (include desktop layout)
    • revert display manager (sddm) to the default theme (Breeze/Breath).

Updating the smart way includes knowing which packages may pose a problem if the update is run with the GUI. I showed you a list of packages which by a lot of users experience often requires special attention.

When Pamac shows you a huge list of update - it can be hard to get a clear view and you could miss one.

You can use a small utility script simplifying the task of evaluating a huge list of updates.

When you have evaluated the list and found this update to have the potential to stall - the smart way is to update using the console. Logout of your GUI and switch to TTY.

Don’t ever interrupt the process

Don’t ever interrupt the process - intentionally or unintentionally.

Ensure you are not doing your update when your area are known to have power outage, power spikes, or during stormy weather which can cause interruptions to the power grid - if your system loses power you will probably have a problem getting it back up and runnning.

Ensure mirror is up-to-date

Before syncronizing your system optionally ensure your primary mirror is up-to-date

$ pacman-mirrors
Pacman-mirrors version 4.16.4
Local mirror status for unstable branch
Mirror #1   OK  00:31   Denmark  https://www.uex.dk/public/manjaro/

Ensure enough diskspace

If you don’t regularly clean up you system - now is a good time

Remove old entries from the journal (reduce the size to 50M)

sudo journalctl --vacuum-size=50M

Cleanup your pacman cache (this will remove uninstalled packages and reduce pkg versions to the installed version). Note: The pacman-contrib package is required to run the following command.

sudo paccache -ruk0

Updating

Logout of your GUI and switch to TTY- CtrlAltF4 and run the update. Depending on the result you may proceed to update the system

If you are using dkms based drivers - ensure they are rebuild without errors.

sudo pacman -Syu
Rarely used forced metadata sync

If you need to rebuild your mirror list - you will need to use below variation of the update command - forcing your system package metadata to equal your primary mirror’s metadata and as pointed to by @cscs Pamac has a timer - rebuilding your mirror list on a regular base - in which case this command should be favored.

sudo pacman -Syyu

When you reboot after a successful update - first thing to do is rebuilding your foreign packages and drivers. This can be done from a terminal in the GUI session - but if you want to ensure you get no problems - TTY is recommended e.g. CtrlAltF4.

Depending on your environment, you switch back to GUI using CtrlAltF7 or CtrlAltF2

Rebuilding all your AUR packages using a single command e.g.

pamac upgrade -a

After succesful sync

Reapply your custom theming and give yourself a :clap: - you deserve it.

Conclusion

Following a few basic rules will help you keep your system healthy and hopefully you will avoid problems from a stalled update.

50 Likes
Is Manjaro really big risk for beginner?
Update breaks the Manjaro OS
Update only when installing new software
How to avoid rebooting after nVidia driver update?
[Stable Update] 2020-10-19 - Kernels, Nvidia 455, Browsers,
How much longer can I keep gnome 3.36.x? (need it for gaming)
Why can't graphical installer create boot partition if I choose GPT over MBR?
[Stable Update] 2021-06-14 - Kernels, Browsers, Mesa, Deepin, Systemd, Gnome Apps 40.2, Pipewire, Haskell
Any Firefox Updates past 88.1 Freezes The Whole System
Best practices to safeguard our system against unforeseen interruptions during updates and installations
Entire Manjaro system hosed with qt5ct upgrade
Install two versions of gcc gfortran compiler
Expectations from a stable release : an user's perspective
Linux Update Interrupted And Now Linux Broken
Pamac fails to synchronise due unacceptable TLS certificate
Problems installing moc-pulse AUR package
Should I reinstall?
Berryboot manjaro image 19.06 isn't upgradeable, pacman-mirrors disappeared
How does one configure Manjaro in such a way that EACH & EVERY piece of software offered for upgrade is a stable version (not bleeding edge)?
Please use kernel-modules-hook instead of kernel-alive!
==> ERROR: Missing 5.17.9-1-MANJARO kernel headers for module v4l2loopback/0.12.5
What are the advantages or disadvantages to using Manjaro instead of Ubuntu-based distros?
Unable to install mongoDB
[Stable Update] 2021-11-19 - Kernels, Gnome 41.1, Plasma 5.23.3, Frameworks 5.88, LxQt 1.0, Xorg-Server 21.1, Mesa
Creating video tutorials, can I use the Manjaro logo?
What are the advantages or disadvantages to using Manjaro instead of Ubuntu-based distros?
Mkvtoolnix-gui: error while loading shared libraries: libcmark.so.0.29.0: cannot open shared object file: No such file or directory
System mess up. Can't make clean install
Does updating system with pacman updates AUR packages as well?
Shaking screen after full system update/upgrade
Pamac feature requests
Python QT6 programs not working, not in Thonny, not from terminal
Install a package using pamac vs pacman -S
Kernel upgrades from `pacman -Syu` fails. Presets aren't being created in `/etc/mkinitcpio.d/`
Pamac updates broke my entire computer (kernel panic)
So many errors or bugs after new update
Should I enable auto update?
Error: file `/boot/vmlinuz-5.15-x86_64’ not found
Pamac GUI - Authentication window still disappears
"Remote Peer Disconnected" error when trying to open Add/Remove Software
Cannot repair after update
How can I determine why the last update was a bit extreme on my system?
Problem with my password
[Stable Update] 2024-05-13 - Kernels, Plasma 6, Gnome 46, LxQT 2.0, Nvidia, Pacman
Should I install these updates from discover or are they potentially unstable?
Having a problem in installing codelite
While Upgrading, encountered errors from AUR python2 packages
Is Manjaro MATE Dying?
Download updates in bits and pieces
Stability Problems with Manjaro-ARM-gnome-rpi4-22.04
System instability
Black screen after latest update on linux 515
Manjaro breaks after failed system update
Help with pamac problem
Some applications take more than half a minute to open
Welcome and introduce yourself - 2022
How do I set the fastest mirror?
Boot issues every update
How long do you use Arch based/Manjaro distro without crashes after update?
Improve upgrade process (especially kernels)
Manjaro won't boot after update, Nvidia problems
Every update every problems
Errors Every Time After Update System
Lightdm-webkit2-greeter no longer accepts the password submission (due to webkit2gtk)
Installed updates and now just get blank screen
Question regarding updates
Manjaro stuck at boot after failed update
Migrating services from Windows and need recommendations
CheckAURVCSUpdates
No network during [root tip] [How To] Update Manjaro the smart way
Will my Pc work without issues with Manjaro?
My Manjaro broke for some reason (Plasma GUI)
Update failed to synchronize to databases
Manjaro vs Mint
Manjaro 24.1 a positive development. Thanks so much for a wonderful distribution
Unable to boot, or run pacman/pamac after latest update
Virtualbox | Extensions Version Mismatch?
Remote desktop, real and dummy monitor
My Manjaro won't boot anymore and I get this message: error file /boot/vmlinuz-6.0-x86_64 not found
New to Manjaro first impressions!
Does Chaotic AUR work on Manjaro with no problems?
How do I bring back the GUI when I start the kernel?
Install Tuxguitar?
System got shutdown while running the command to update the system. now not able to load the kernel
Paccache command not found
Getting make error:
Live USB stuck while booting up
Why does pacman -Syu remove packages installed with yay?
Error en cambio de sesión y ejecución de programas
Applications Unresponsive after System Upgrade
The installer is lagging
Can I remove all partitions?
After updating, logging in returns to the log-in screen
Why does Rolling not match ISO release features/fixes?
Stuck on boot after installing manjaro OS
[Stable Update] 2025-07-12 - Kernels, Systemd, GNOME, NVIDIA, Plasma, Firefox, VLC splits
AUR builds are failing
Apps are closing
Pacman -Syu not working on fresh installed Manjaro
Kscreenlocker showing "Unlocking failed"
Qt packages update: could you integrate the "yay -S qt5-styleplugins" command to your scripts?
Disable update notice
Bleeding Edge Mesa Drivers for Intel ARC 770
INSTALAÇÃO DO STREMIO COM AUR / installation of tremio with AUR
Manjaro maintenance
Problem with updates
System Update problem,often
Does package installation trigger an update?
During update my system crashed and now isn't booting
Terminal output to file and screen during update
Package Manager seems to be stalled
Druckerinstallation Brother MFC-J880DW
Black Screen Issues with KDE Plasma after Windows Update
Blue Screen Of Death on freshly-installed system
Pamac keeps crashing with every update
I can’t update manjaro via command line or GUI
I can't update AUR and other packages in Pamac
Chrome forgets digital signature certificate
Manjaro Nvidia and Nvidia - LTS
[root tip] Topic Collection List View
Can no longer disable my touchpad
Errors when updating conflict between kio and kio5
Can't switch to higher resolution
Plasma 6 update violates dependency for nixnote
Manjaro looks strange after last stable update
[Stable Update] 2024-02-21 - Kernels, KDE, VirtualBox, Calamares, ROCm, Firefox, Thunderbird
No desktop fresh install
Plasma 6 looks awful
Suggestion: make it harder to do a full system update using the GUI
Welcome and introduce yourself - 2024
Latest video drivers/updates messed up my displays
I cannot open the Manjaro "store"
Gnome-Terminal-Transparency Fails To Build
Pamac AUR update error
How could I add more repos like Debian / Ubuntu?
[HowTo] DRAFT: Update your Python packages after a Python version upgrade
NVIDIA broke their 3000 series graphics cards on Linux with a recent update
Few questions for first time Linux user
What to do after installing Manjaro?
Using pamac to upgrade AUR packages
Update KDE the smart way
[Testing Update] 2025-07-19 - Kernels, Mesa, Thunderbird, Grub, Perl, Vulkan
File conflict errors related to Python 3.12
Crash - help me isolate the issue with journalctl
I can't connect to wifi because of a problem in the Network driver
Ich suche eine Virtuelle Maschine die unter einen neueren Lts Kernel läuft
Dysfunctional Pamac
Update 2025-06-23 Breaks the Display of my Laptop's GUI when Invoked from Pamac, Works with Pacman
Add/remove software closes during every update now
[INFO] Stable branch - BIG update BEST practice
Need to rebuild megasync after recent testing update
Cura does not start
Updates after 4 months of not using a computer
Issue installing Howdy
Difference between pamac install and pamac build
Why is paccache not recognized as a command?
Virtscreen error
Manjaro looks strange after last stable update
Pamac GUI - Authentication window disappears
Cannot update due to dependency issues
[Stable Update] 2024-05-13 - Kernels, Plasma 6, Gnome 46, LxQT 2.0, Nvidia, Pacman
How does Manjaro behave on the long term?
My machine just froze
Some questions from an Ubuntu user
Having a ton of upgrades - how to handle?
Welcome and introduce yourself - 2021

For anyone like me, who is yet planning to move away from Windows, this is super useful. Thank you for this tip!

1 Like

Unless mirrors have changed, such as if you have pamac-mirrorlist.timer running :wink:
(in which case 2 ys)

2 Likes

I have some project with some friend to put your OS on some company machine’s and we would like to know is it’s possible to do only security update has in Debian?

In my opinion I would go with full update but my friend are a bit … well they fear it will crash to often. (I have been using manjaro for the past cople of year’s with almost no issue in that regard but I have to convince them :slight_smile: )

No.

Arch/Manjaro comes with the following requisite:
Partial Upgrades are Not Supported.

You could probably hold off on updates for some time … but I wouldnt suggest for long.
And … if you need to install another package - its full update time.

You can check a box in pamac to install a package without updating under preferences.

So if you needed a program on the day of updates and you didn’t want to update until others had updated first, in order to avoid problems you could do so.

Also in Preferences you can set a program not to be updated. That might be useful if you need a program to work a certain way. Although it might be better to use a flatpak in that situation.

Well … yeah … I could set my kernel and more to the “IgnorePkg” line … but its still not supported and still a bad idea.

https://wiki.archlinux.org/index.php/System_maintenance#Partial_upgrades_are_unsupported

… are you sure?
At least for the longest time that was impossible, and I certainly cant find such an option.

pamac was built with just these kinds of mistakes in mind. And thus defaulted to refreshing dbs and downloading updates whenever there is a package transaction.
pacman on the other hand you could fire away using -S and it wouldnt update.
But again … that is the incorrect way to install a package, and considered a partial upgrade. (see above)

Under Preferences/Advanced/ Do not check for updates when installing.

1 Like

While I’m at it, two little thing’s that bug me with update’s.
I know that I can do some automatic update but is there a way to set it up with pamac or I do have to create a service with a cron job that run every day?
Also, is there a way to make the power manager or the screen manager to keep my computer alive while it is updating? i had some issues with this before, If I try to update and forget to remove the auto-lock and sleep, my computer would go to sleep while updating creating a huge mess!!

Thank’s! That’s what I tough but you never know :slight_smile:
I think I will go with snap or flatpack instead for most of the software part and maintain the system separately

Ah. I do see it now. Wonder when that got added.
I am not totally against it.
But … theres a reason its under Advanced.

Couldnt tell you for sure as … I wouldnt use such a thing.
But … it looks like pamac can handle it … though it will still prompt (not just do it without asking).

Eh … you could do any number of things, like in plasma set to ‘presentation mode’, make an alias so that updates always keep the session active, etc etc …
I think I actually wrote a script for someone like this somewhere … if I find it I will post.

1 Like

If you do that, I’d suggest the routine includes at least these two things:

  • Checking available disk space (the cache(s) can accumulate a LOT of previously-installed packages over time if not kept an eye on)

  • Verifying that the system isn’t running on battery before doing updates.

1 Like

This is indeed good advise!

A post was split to a new topic: Update KDE the smart way

A post was split to a new topic: Using pamac to upgrade AUR packages

A post was split to a new topic: Paccache command not found