Dietpi-update How does it work?

I cannot find much information on this command dietpi-update (refer to docs). I am interested in how it works. My concern is that by updating the operating system and if it fails, do I lose everything (all my work including my remote connection)? Any insight into how this command works would be appreciated. Thank you.

Theoretically you could have a look into the code located on GitHub.

But this could be challenging if you don’t understand bash scripting.

In short, it offers a backup, followed by apt update and apt upgrade and a DietPi code update. Basically 2 steps. One is doing the Debian system update and the other will patch DietPi scripts.

1 Like

Hello @Joulinar. Thank you for your reply. However, I still want to know what happens when the OS update fails. The backup step sounds promising.

I would suggest you run dietpi-backup and create a backup first. Then if you run dietpi-update, and if it fails for some reason, then you have a backup to restore from. Is that correct @Joulinar ?

Correct.

But using apt update and apt upgrade is not a DietPi special function. apt is the standard Debian package manager.

Thank you @jgreyz for the advice. Still curious as to what happens if dietpi-update fails. Does the OS become unusable? Or does it revert to a usable state, perhaps with the backup?

There is nothing restored automatically. A failing dietpi-update will not automatically result in a broken system. Usually system will be usable still.

Again, DietPi is based an Debian and we use standard Debian command apt update and apt upgrade to update Debian packages, like on every other Debian system.

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