From d3c7daca1551c9cbf8c86702b24c89a45947028c Mon Sep 17 00:00:00 2001 From: tiyn Date: Tue, 11 Nov 2025 03:41:34 +0100 Subject: [PATCH] linux: added debian an apt (minor and major) upgrades --- wiki/linux/debian.md | 64 +++++++++++++++++++++++++++++++++++ wiki/linux/package_manager.md | 39 +++++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 wiki/linux/debian.md diff --git a/wiki/linux/debian.md b/wiki/linux/debian.md new file mode 100644 index 0000000..60dc31e --- /dev/null +++ b/wiki/linux/debian.md @@ -0,0 +1,64 @@ +# Debian + +[Debian](https://www.debian.org/) is a free and open-source [Linux](/wiki/linux.md) distribution. + +## Usage + +This section addresses the usage of Debian specific tasks. + +### Retrieve Debian Version + +The current version of a Debian system can be retrieved by running the following command. + +```sh +cat /etc/os-release +``` + +### Upgrading to a Higher Major Version + +If the user of the system to perform a major version upgrade on is using [Docker](/wiki/docker.md) +some additional steps have to be taken before the upgrade. +It is generally recommended to hold the Docker upgrade and performing it later. +For this reason the following command has to be run first. + +```sh +apt-mark hold docker-ce docker-ce-cli containerd.io +``` + +The first step for a major upgrade usually is +[retrieving the current version](#retrieve-debian-version). +Afterward the packages of the current major release version have to be +[upgrading](/wiki/linux/package_manager.md#debian-updating-upgrading) using APTs `full-upgrade` +option. +Then a reboot is recommended. + +After restarting APT needs to be assigned new sources. +This can be done by editing the file `/etc/apt/sources.list` and replacing everything within with +the new sources. +For Debians 12th version called bookworm this lines to add are the following. + +```txt +deb http://deb.debian.org/debian bookworm main contrib non-free +deb http://deb.debian.org/debian bookworm-updates main contrib non-free +deb http://security.debian.org/debian-security bookworm-security main contrib non-free +``` + +Following this a [full upgrade](/wiki/linux/package_manager.md#debian-updating-upgrading) has to be +performed. +Sometimes this process asks if the user wants to replace the local configuration files with newer +ones. +It is generally recommended to select `N` and reject these new configurations. + +Finally another reboot is needed and the version number can be +[checked again](#retrieve-debian-version) confirming that the major version upgrade was +successfully performed. + +When the system ran Docker and its upgrade was put on hold as described at the start of this +section the following commands have to be run to finalize the major upgrade, take Docker from the +hold list and upgrade it. + +```sh +apt-mark unhold docker-ce docker-ce-cli containerd.io +apt update +apt install --only-upgrade docker-ce docker-ce-cli containerd.io +``` diff --git a/wiki/linux/package_manager.md b/wiki/linux/package_manager.md index c622c9a..166aa3f 100644 --- a/wiki/linux/package_manager.md +++ b/wiki/linux/package_manager.md @@ -2,6 +2,45 @@ Package managers are important programs to get software onto your system. +## Debian & Debian-Based Systems: APT + +In [Debian](/wiki/linux/debian.md) the APT package manager is used. +It is also used for various Debian-based distributions. + +### Debian: Usage + +This section addresses various usages of the APT package manager. + +#### Debian: Updating & Upgrading + +This section addresses the updating of all packages managed by APT. +To update the packages it is recommended to first update the package list with the following +command. + +```sh +apt update +``` + +Afterwards there are two possible update types without changing the major release version. + +The following command - `upgrade` - updates the packages only if no new or previously removed dependencies are +needed. +It is generally used for day-to-day updating without bigger jumps between versions. + +```sh +apt upgrade +``` + +The other option is `full-upgrade` which was previously also known as `dist-upgrade`. +This command will also install, remove and replace dependencies if it is needed to update the +package. +It is mostly used for bigger updates like Kernel or release upgrade without changing the major +version. + +```sh +apt full-upgrade +``` + ## Arch Linux: Pacman and Yay In [Arch Linux](/wiki/linux/arch-linux.md) there are 2 main types of