[INFO] Stable branch - BIG update BEST practice

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.

:one: Never lose power

  • Ensure a stable power supply
  • Never force reboot your system at any point

:two: Optional precaution

Optional

  • keep a rescue stick at hand (just in case)
  • snapshot your root file system (timeshift, just in case)
  • :information_source: Snapshot is not a replacement for proper preparation/maintenance.
  • :information_source: Snapshot does not fix inconsistencies with your custom packages (if any).

:three: :warning: 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 is 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. mesa or vulkan

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 :man_facepalming: I should have …

Remove all custom packages

:information_source: Note: Any local setting will always be retained.

Using pamac
pamac remove $(pamac list --foreign --quiet)
Using native pacman
pacman -Qqm | pacman -Rns -

:four: 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 -

:five: 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>

:six: 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

:seven: 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 pacman-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

:person_lifting_weights: 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

:eight: After update

After the update - before reboot - act upon messages displayed during the update.

Check your system for changes to your configuration files .pacnew.

sudo find /etc -name '*.pacnew'

:information_source: It is seldom necessary to take any action - suggestion is to keep it for reference or delete it. If you keep it - you may want to change .pacnew to e.g. .reference to remind yourself of the purpose, also you are not reminded next time you check for changes.

:nine: 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.txt created earlier
  • rebuild only the custom packages you really need

:ten: Related topics

10 Likes

17 posts were split to a new topic: RE: [Info] STable branch - BIG update BEST practise