Best practice for stable update
This is a summary of observations related to updates of Manjaro Linux.
The observations are collected from almost a decade - spanning three forum instances (yes discourse has broken down on Manjaro on two occasions).
While there can never be any guarantees or promises - your system will be in a much better condition to sync the latest stable branch snap.
Never lose power
- Ensure a stable power supply
- Never force reboot your system at any point
Optional precaution
Optional
- keep a rescue stick at hand (just in case)
- snapshot your root file system (
timeshift, just in case)
Snapshot is not a replacement for proper preparation/maintenance.
Snapshot does not fix inconsistencies with your custom packages (if any).
AUR Housekeeping AKA custom/foreign/alien packages
Custom packages may wreck the process.
This goes for AUR and any package not in the official repositories.
Create a list of custom packages for later reference
Using Manjaro pamac
pamac list --foreign > ~/alien-pkgs.txt
Using native pacman
pacman -Qm > ~/alien-pkgs.txt
Carefully evaulate the content of the list
There are no rules for this part - you are the system administrator and as such you are required to know if there could be an issue with the application.
- Do I really need
<pkgname> - Do I use frequently
<pkgname> - Is it non-intrusive e.g.
google-chrome - Is it compiled from source e.g.
megasync - Does it rely on system libraries e.g.
mesaorvulkan
The more complicated a custom package is - the potential for problems increase.
Depending on your evaluation you may choose to ignore the package(s)
- just remember: Man
I should have …
Remove all custom packages
Note: Any local setting will always be retained.
Using pamac
pamac remove $(pamac list --foreign --quiet)
Using native pacman
pacman -Qqm | pacman -Rns -
General Housekeeping
To remove clutter and reduce the size of the update,
clean your system by removing all orphans and unneeded packages.
Using pamac
pamac remove --orphans --unneeded
Using native pacman
pacman -Qdtq | sudo pacman -Rns -
pacman -Qqd | sudo pacman -Rsu -
Kernel Housekeeping
List your installed kernels
mhwd-kernel -li
If you have more than one kernel installed - consider removing the excess kernels using mhwd-kernel.
If you want to avoid the linux-meta package - used to switch from EOL to supported - ensure your currently running kernel is LTS - then remove the excess kernels and related packages.
mhwd-kernel -r <linux><version>
Check
Run a simulated update - strictly not necessary - but it could give you peace of mind
Using Manjaro pamac
pamac update --dry-run
Using native pacman
sudo pacman -Syu --print
Execute
optional: update keyrings
Optional: ensure the keyrings are up-to-date; it may happen that a keys are added, removed or updated/replaced.
sudo pacman -Syy manjaro-keyring archlinux-keyring
Don’t use GUI
GUI applications may become unstable during update so run the update from command line using virtual terminal or TTY
Execute the actual update, read any messages thoroughly
Using Manjaro pamac
pamac update --no-aur
Using native pacman
sudo pacman -Syu
To get important messages view pacman log file using less and filter the entries for the date in question e.g.
grep -e '2025-12-08' /var/log/pacman.log | less
power users
Install the screen multiplexer. You will need a lot more than the default 100 lines in the buffer - to be on the safe side - 1000 lines perhaps more - 10000 lines
screen -h 10000
When the update is done, you can view the buffer
- enter copy mode Ctrl+A then Esc
- scroll with the navigation keys
- when done Esc
– https://unix.stackexchange.com/a/714694
Remember to run the multiplexer (screen, tmux or other) first and then run the update from it, to be able to scroll.
After update
After the update - before reboot - act upon messages displayed during the update, if any.
Check your system for changes to your configuration files .pacnew, e.g by
pacdiff -o
There are two convenience packages in this regard - manjaro-pacnew-checker - a graphic notifier program, and meld - a graphic comparison app for those finding vi overwhelming.
Assuming you have meld installed, you can manually check for pacnews with
DIFFPROG=meld pacdiff -s
Note the lack of sudo here - pacdiff will ask for it itself when needed.
Pacdiff will now go through all registered pacnews in a loop (the general idea is to remove them after done merging). For every file, always hit V (View) and never M (merge)!. Meld will open. Inspect, compare, move stuff. Do not blindly overwrite or discard!! If unsure - cancel and ask here. The idea here is to merge the new format of the default settings for a program with your customizations. You decide at which file do you want to work and later discard the other - look at the window title to see where is the pacnew. After being ready, hit the save icon above the file you decided to modify and close meld. You will be asked again - depending on what you edited and saved, you can now overwrite with the pacnew (if you customized there) or delete it (if you added the new stuff to the existing config).
Note that tending the pacnews is never urgent, but it is highly recommended to do it at some point, the sooner the better. Because after some grace period from a couple of months or 1-2 years, the new sometimes incompatible config will become the default and that might actually break your system if you did not do it by then.
Restart your system
After a successful restart of your system, recheck for unneeded or orphaned packages using a simulate run - expect the result to be empty - if it is not - repeat the command without --dry-run
pamac remove --orphans --unneeded --dry-run
Then proceed to handle your custom packages
- open the
~/alien-pkgs.txtcreated earlier - rebuild only the custom packages you really need
Related topics
- How to handle some pacnew files best
- System Packages And Due Diligence
- Arch Wiki - Pacman/Tips and tricks
- HowTo - Basic Manjaro Rescue and Recover
- HowTo - Updating Manjaro as safely as possible
- HowTo - Update Manjaro the smart way
- NeedToKnow - About Manjaro And AUR