Updating the os

From ALT Linux Wiki

Updating an operating system usually means bringing all its components up to date. Next, refer to the appropriate section: OS Upgrade or Upgrade to the next OS version.

OS Update

You can perform the update using the following commands

# apt-get update && apt-get dist-upgrade && update-kernel

or with one command

# epm full-upgrade

epm full-upgrade will take all actions to update all installed components (including those installed via epm play, flatpak, snap).

Upgrade to the next OS version

As a rule, it is possible to upgrade the installed ALT Linux distribution to the next version without having to reinstall it again.

When updating, you should follow several rules to avoid trouble in the form of package deletion and system collapse due to an administrative command you inadvertently gave.

The update itself is performed by specifying the required repositories in the files /etc/apt/sources.list.d/*.list, /etc/apt/sources.list and executing the commands apt-get update && apt-get dist-upgrade

First, set the repository of the updated OS you wish to use. For example, if you wish to upgrade from p9 to p10, use the command (only use after p7):

# apt-repo set p10

Then, using the new repository source:

# apt-get update && apt-get dist-upgrade

or by equivalent actions in the graphical utility synaptic; after which the kernel should also be updated with the command update-kernel (not implemented in Synaptic).

# update-kernel

If, when trying to do apt-get dist-upgrade, errors about unsatisfied dependencies is displayed, then apt and rpm should be updated first:

# apt-get update && apt-get install apt rpm && apt-get dist-upgrade

In any case, it is recommended to update apt and rpm before apt-get dist-upgrade.

Upgrade to the next OS version using epm

To upgrade the distribution to the next version, run

# epm release-upgrade

The update includes changing repositories, updating all packages, and updating the kernel.

Updating the distribution to Sisyphus is performed with the following command (recommended only if you know what you are doing):

# epm release-upgrade Sisyphus

Special Notes

  • one repository should be specified (possibly containing several components or architectural sections)
    do not forget to check the contents of /etc/apt/sources.list.d/*.list, it is easy to skip among them /etc/apt/sources.list.d/sources.list or /etc/apt/sources.list.d/cdrom.list Alternatively, by using apt-repo rm all to disable everything at once, this will not delete records about repositories, but only comments. After that, manually connect (uncomment by deleting the # in the lines) only the necessary ones.
  • to change the source, starting from p7, it is also convenient to use the apt-repo utility.
  • the most common repository for each distribution, starting from version 3.0, is the corresponding [[Branches|]
  • starting from the 4.0 branch, it is mandatory to connect not only the architecture-dependent (i586 or x86_64), but also the interarchitectural (noarch) section of the corresponding repository with the second line
  • if you are using software with a related core/user part (for example, the NVIDIA or VirtualBox driver) -- it is necessary to also perform kernel update using update-kernel.
  • if there are a significant number of candidates for deletion, it is better to abandon dist-upgrade, double-check the configuration of repositories and consult the community mailing list@
  • ubuntu and similar distributions have adopted a different sequence of commands (apt-get update; apt-get upgrade). In ALT distributions, it generally does not work, because it does not track changes in dependencies. The use of such a sequence of commands leads to the occurrence of incorrigible errors in dependencies.

Within the version

  • updates can be obtained from the corresponding branch distribution (for example, p8/branch for Alt p8 or p5/branch for Alt Linux School 5.0)

Between versions

  • you should not take "jumps" further than to the next brunch!
    for example, the procedure for a possibly painless upgrade from Server 4.0 to the t6 branch looks like a chain of updates between branches: 4.0=>4.1=>5.0=>5.1=> t6[1]
  • before trying to switch between branches you should roll all available updates from the current (especially rpm and aptapt-get update; apt-get install rpm apt)
  • check the details of the transition on the appropriate pages for p10, p9, p8, etc.

apt-get upgrade

Despite the fact that the upgrade command exists, it should be used carefully, or not at all. Quote from "ALT Linux Master 2.0. System Administrator's Guide":

The apt-get upgrade command is used to update all installed packages. It allows you to update those and only those installed packages for which new versions are available in the repositories listed in /etc/apt/sources.list; at the same time, no other packages will be deleted from the system. This method is useful when working with stable application packages, for which it is known that they do not change significantly when changing the version.

Sometimes, however, there is a change in package naming or a change in their dependencies. Such situations are not handled by the apt-get upgrade command, resulting in a violation of the integrity of the system: Unsatisfied dependencies appear. For example, renaming the MySQL-shared package containing dynamically loaded libraries for working with MySQL databases to libMySQL, reflecting the general trend towards naming libraries in the distribution, does not lead to the fact that installing an updated version of libMySQL requires deleting the old version of MySQL-shared. To solve this problem, there is a distribution—wide upgrade mode - apt-get dist-upgrade.


  • Changes — a page about the most scratchy changes; it also contains links to pages on brunches and highly recommended for studying in advance — on rpm and apt
  1. Despite the fact that the release of distributions on 5.0/branch was canceled, the update between 4.1 and 5.1 with its participation as an intermediate point is softer than directly.