1
0
mirror of https://github.com/tiyn/wiki.git synced 2025-11-19 10:19:45 +01:00

linux: added debian an apt (minor and major) upgrades

This commit is contained in:
2025-11-11 03:41:34 +01:00
parent 179a9d2426
commit d3c7daca15
2 changed files with 103 additions and 0 deletions

64
wiki/linux/debian.md Normal file
View File

@@ -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
```

View File

@@ -2,6 +2,45 @@
Package managers are important programs to get software onto your system. 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 ## Arch Linux: Pacman and Yay
In [Arch Linux](/wiki/linux/arch-linux.md) there are 2 main types of In [Arch Linux](/wiki/linux/arch-linux.md) there are 2 main types of