Best practices to safeguard our system against unforeseen interruptions during updates and installations

After browsing around the forum, I found several posts on the subject of the entire system breaking (failing to boot, etc.) after an interrupted system update. And since it is essential to do a full system update every time we install new packages ( sudo pacman -Syu <package> ), I’m assuming that the risks associated with interrupted updates apply to package installations as well.

Are there measures/steps we can take to safeguard ourselves against these risks? Maybe a workaround involving a software tool or some package that deals with these types of situations? Or even some “best practices” advice for newbies like me to take note of. I mean, beyond the basics like ensuring a stable internet connection, avoid installing new packages without updating, etc. etc.

Having said that, there are still things that are out of our control. Maybe there is a sudden power outage that takes out my internet connection? Or a sudden hardware failure that forces a system shutdown during an update?

Btrfs with snapshotting, which is available for the Manjaro RC and has better support in the next release, is a good approach to be more on the save side.

As far as I can tell, Manjato will do a Btrfs snapshot of your system before installing packages in the future. If there occurs a problem while installing, you can “simply” rollback to the state before updating.

So I guess this would be good step into this direction.

I have no experience with this for now, so maybe another user can elaborate more on this.

We have an article on the subject


Backup your system before updating.


Thank you everyone for your answers.

@linux-aarhus The article is exactly what I needed. The steps and explanations are clear, and I will refer to it from time to time to make sure I understand everything. I do, however, still have some questions. Hardware failures aside, what about less serious interruptions such as internet disconnections? For example, if my internet connection is interrupted in the middle of the upgrade, will pacman “pause” to wait for the connection to come back and then resume?

@nhutier @maycne.sonahoz Indeed. Having backups is really the most basic step of all. I’ve gone through the README for Timeshift to learn how to use it.

The way pacman works - is to download the packages and the packages are verified by signatures and packages which fail will interrupt the update process.

This makes pacman resilient to errors where the internet connects is severed as the update will not be executed unless all packages required is available in the package cache.

1 Like

Just to make sure I understood everything correctly. So if my internet connection is disconnected when pacman is still in the “download phase” (it suddenly stopped downloading), and I terminate the process with CTRL-C, the system won’t break? Then, after I fixed my connection and I run sudo pacman -Syu pacman will restart the whole process with no problems (downloading packages, verifying signatures, installing)?

That is correct.

I assume these fail-safe measure apply to pamac as well? Does pamac use pacman behind the scenes?

pamac uses alpm library which is the pacman engine.

pamac is a Manjaro specific application - with extra functionality like snap and flatpak and may warrant other considerations - but pacman is the native Archlinux package manager.

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