Documentation - lbr38/linupdate GitHub Wiki

Installation

Requirements

linupdate is regulary tested and should run fine on following systems (python3 required):

  • Debian 11, 12 and derivatives (Ubuntu, Linux Mint, ...)
  • RHEL 9, 10 and derivatives (CentOS, Rocky Linux, Alma Linux, ...)

RHEL 8 and derivatives are not supported anymore.

Package installation

Login as root or use sudo to proceed installation.

DEB and RPM packages are hosted on my personal repository.

Installation on a Debian family system

Add linupdate repository key:

curl -sS https://packages.repomanager.net/repo/gpgkeys/packages.repomanager.net.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/packages.repomanager.net.gpg

Add linupdate repository:

Debian 12 (Bookworm)
echo "deb https://packages.repomanager.net/repo/deb/linupdate3/bookworm/main/prod bookworm main" > /etc/apt/sources.list.d/linupdate.list
Debian 11 (Bullseye)
echo "deb https://packages.repomanager.net/repo/deb/linupdate3/bullseye/main/prod bullseye main" > /etc/apt/sources.list.d/linupdate.list
Ubuntu 24.04 (Noble)
echo "deb https://packages.repomanager.net/repo/deb/linupdate3/noble/main/prod noble main" > /etc/apt/sources.list.d/linupdate.list
Ubuntu 22.04 (Jammy)
echo "deb https://packages.repomanager.net/repo/deb/linupdate3/jammy/main/prod jammy main" > /etc/apt/sources.list.d/linupdate.list

Install:

apt update && apt install linupdate

Installation on a RHEL family system

Add linupdate repository:

RHEL 9 and derivatives (CentOS, Alma, Rocky ...)

Important: Make sure to have EPEL repository enabled (Fedora EPEL, CentOS EPEL, Oracle EPEL or whatever...) and also the CRB (CodeReady Linux Builder) repository, as it provides the necessary python3 packages.

echo -e "[linupdate3]
name=linupdate3 repo on packages.repomanager.net
baseurl=https://packages.repomanager.net/repo/rpm/linupdate3/9/prod
enabled=1
gpgkey=https://packages.repomanager.net/repo/gpgkeys/packages.repomanager.net.pub
gpgcheck=1" > /etc/yum.repos.d/linupdate.repo
RHEL 10 and derivatives (CentOS, Alma, Rocky ...)

Important: Make sure to have EPEL repository enabled (Fedora EPEL, CentOS EPEL, Oracle EPEL or whatever...) and also the CRB (CodeReady Linux Builder) repository, as it provides the necessary python3 packages.

echo -e "[linupdate3]
name=linupdate3 repo on packages.repomanager.net
baseurl=https://packages.repomanager.net/repo/rpm/linupdate3/10/prod
enabled=1
gpgkey=https://packages.repomanager.net/repo/gpgkeys/packages.repomanager.net.pub
gpgcheck=1" > /etc/yum.repos.d/linupdate.repo

Install:

dnf install linupdate

Global configuration

Print current configuration

It will print the current configuration of linupdate and its enabled modules in a YAML format.

linupdate --show-conf

Profile and environment

On a basic usage of linupdate, profile and environment are useless, but some modules (e.g. reposerver) can use profile and environment to provide different configurations.

Get current profile

linupdate --profile

Set profile

linupdate --profile <PROFILE>

Get current environment

linupdate --env

Set environment

linupdate --env <ENV>

Enable or disable mail report

Mail report is send on every update performed by linupdate. You may have a local mail server running on your system to send mail (e.g. postfix).

linupdate --mail-enable <true/false>

Get current mail recipient(s)

linupdate --get-mail-recipient

Set mail recipient(s)

Multiple recipients can be specified by separating them with a comma.

linupdate --mail-recipient <EMAIL>

Update options and usage

Check for available package updates

linupdate --check-updates

Update packages

Perform a basic update

linupdate

Perform update with dist-upgrade (Debian)

linupdate --dist-upgrade

Perform a non-interactive update (with cron, at...)

The -y (assume yes) parameter must be specified to avoid any confirmation prompt.

linupdate -y

Notes:

By default, the update will keep current packages configuration files (Dpkg::Options::=--force-confdef & Dpkg::Options::=--force-confold)


Perform an update and ignore all packages exclusions

linupdate --ignore-exclude

Exclude package(s) from update

  • Packages must be separated by a comma.
  • You can use .* regex to match all packages name starting with specified pattern.
linupdate --exclude httpd,mysql.*,php.*

Exclude package(s) from update (on major release update)

This will exclude package(s) from being updated only if the available release version update is a major version.

  • Packages must be separated by a comma.
  • You can use .* regex to match all packages name starting with specified pattern.
linupdate --exclude-major httpd,mysql.*,php.*

Notes:

Linupdate consider it's a major update if the first digit of the version is changing. e.g:

  • Current version is: 1.8.1
  • Available version is: 2.0.0

Restart service(s) after update

Services must be separated by a comma. Services will be ignored if they are not installed on the system.

linupdate --restart-service httpd,mysql

Change update method

By default, linupdate will use one_by_one method to update packages, meaning that it will update packages one by one (using one dnf or apt command per package). Another global method is available to update all packages at once (using one dnf or apt command for all packages).

Recommended method: one_by_one.

linupdate --set-update-method <one_by_one/global>

Exit on package update error

If set to true and when update method is one_by_one, linupdate will immediately exit if an error occurs during package update and do not update the remaining packages

linupdate --exit-on-package-update-error <true/false>

Modules

List available modules

linupdate --mod-list

Enable a module

linupdate --mod-enable <MODULE>

Disable a module

linupdate --mod-disable <MODULE>

Print module's commands

linupdate --mod-exec <MODULE> --help

Execute module's command

linupdate --mod-exec <MODULE> <MODULE_PARAM>

Agent

linupdate agent is a systemd service that is running in background to execute modules commands on a regular basis.

Check if the service is running

systemctl status linupdate

If any module is enabled, it will run its agent and execute its commands. E.g. when reposerver module is enabled:

août 22 10:28:45 host service.py[45881]: [linupdate] Hi, I'm linupdate service. I will start all enabled module agents and let them run in background. Stop me and I will stop all module agents.
août 22 10:28:48 host service.py[45881]: [linupdate] Starting reposerver module agent
août 22 10:28:48 host service.py[45902]: [reposerver-agent] Hi, I'm reposerver module agent
août 22 10:28:50 host service.py[45902]: [reposerver-agent] Periodically sending informations about this host to the repomanager server
août 22 10:28:50 host service.py[45902]:  Sending general informations to http://repomanager-dev.localhost:
[...]

Restart the service

Restarting the service will stop all enabled module agents and start them again.

systemctl restart linupdate
⚠️ **GitHub.com Fallback** ⚠️