Documentation - lbr38/linupdate GitHub Wiki

Installation

Requirements

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

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

Older OS can still run linupdate 2.x.x (bash version) but will not be supported anymore:

  • Debian 10
  • CentOS 7

Package installation

Login as root or use sudo to proceed installation.

DEB and RPM packages are hosted on my personal repository.

Install linupdate 3.x

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/linupdate3/bookworm/main_prod bookworm main" > /etc/apt/sources.list.d/linupdate.list
Debian 11 (Bullseye)
echo "deb https://packages.repomanager.net/repo/linupdate3/bullseye/main_prod bullseye main" > /etc/apt/sources.list.d/linupdate.list
Ubuntu 24.04 (Noble)
echo "deb https://packages.repomanager.net/repo/linupdate3/noble/main_prod noble main" > /etc/apt/sources.list.d/linupdate.list
Ubuntu 22.04 (Jammy)
echo "deb https://packages.repomanager.net/repo/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

Important: Be sure to have EPEL repository enabled (Fedora EPEL, CentOS EPEL, Oracle EPEL or whatever...) as it provides the necessary python3 packages.

Add linupdate repository:

RHEL 8 and derivatives (CentOS, Alma, Rocky ...)
echo -e "[repomanager-linupdate3-el8_prod]
name=linupdate3-el8 repo on packages.repomanager.net
baseurl=https://packages.repomanager.net/repo/linupdate3-el8_prod
enabled=1
gpgkey=https://packages.repomanager.net/repo/gpgkeys/packages.repomanager.net.pub
gpgcheck=1" > /etc/yum.repos.d/linupdate.repo
RHEL 9 and derivatives (CentOS, Alma, Rocky ...)
echo -e "[repomanager-linupdate3-el9_prod]
name=linupdate3-el9 repo on packages.repomanager.net
baseurl=https://packages.repomanager.net/repo/linupdate3-el9_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
Install linupdate 2.x for older OS

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 10 (Buster)
echo "deb https://packages.repomanager.net/repo/linupdate/buster/main_prod buster main" > /etc/apt/sources.list.d/linupdate.list

Install:

apt update && apt install linupdate

Installation on a RHEL/CentOS system

Add linupdate repository:

RHEL 7 and derivatives (CentOS)
echo -e "[linupdate]
name=linupdate repo on packages.repomanager.net
baseurl=https://packages.repomanager.net/repo/linupdate_prod
enabled=1
gpgkey=https://packages.repomanager.net/repo/gpgkeys/packages.repomanager.net.pub
gpgcheck=1" > /etc/yum.repos.d/linupdate.repo

Install:

yum install linupdate

Global configuration

Print current configuration (linupdate 3.x only)

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 (linupdate 3.x only)

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 3.x only)

linupdate --get-mail-recipient

Set mail recipient(s) (linupdate 3.x only)

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 (linupdate 3.x only)

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 (linupdate 3.x only)

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 (linupdate 3.x only)

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** ⚠️