更新、升级与回滚

Installing updates with Silverblue is easy and fast (much faster than other operating systems). It also has a special rollback feature, in case anything goes wrong.

Updating Silverblue

OS updates in Silverblue are fully integrated into the desktop; you will be automatically notified when an update is available. The standard behavior is to automatically download the update (this can be changed from the update preferences in Software).

Once an update is ready, it is just a matter of rebooting to start using the new version. There is no waiting for the update to be installed during this reboot.

If you’d prefer, it is also possible to update using the command line. To do this, run:

$ rpm-ostree upgrade

This will check for new updates and download and install them if they are available. Alternatively, to check for available updates without downloading them, run:

$ rpm-ostree upgrade --check

主要版本间升级

Upgrading between major versions (such as from Fedora 35 to Fedora 36) can be completed using the Software application. Alternatively, Silverblue can be upgraded between major versions using the ostree command.

First, verify the branch is available. You can print all available branches with this command:

$ ostree remote refs fedora | grep silverblue

After you verify the name of your branch, you are ready to proceed. For example, to upgrade to Silverblue 36, the command is:

Currently, the default remote for Silverblue 36 is named fedora. If this is not the case for your system, you can find out the remote name by issuing: ostree remote list.
$ rpm-ostree rebase fedora:fedora/36/x86_64/silverblue

版本间的升级和普通的更新是非常相似的:新版系统被下载到后台,你只需重启系统就可以启动新系统。

回滚

Silverblue keeps a record of the previous OS version, which can be switched to instead of the latest version. While this shouldn’t usually be necessary, it can be helpful if there is a problem with an update or an upgrade (rollbacks work the same way for both), as well as for development purposes.

回滚到旧版本有两种方法:

  1. 临时回滚:要临时地切换到上一版的系统,只需要重启并在启动选单(也就是 GRUB 引导菜单)中选择旧版系统就可以了。

  2. 永久回滚:要回滚到旧版本并希望回滚持续生效,你可以使用 rpm-ostree rollback 命令。

After rolling back, you will technically be on an old OS version, and may be prompted to update. Updating will undo the rollback, so should be avoided if you want the rollback to stay in effect.