181 lines
7.3 KiB
Plaintext
181 lines
7.3 KiB
Plaintext
.TH LINUX-UPDATER 8 "October 2026" "linux-updater 2.0.0" "System Administration Utilities"
|
|
.SH NAME
|
|
linux-updater \- unified, safe multi-distribution Linux system update utility
|
|
|
|
.SH SYNOPSIS
|
|
.B linux-updater
|
|
[\fB\-y\fR|\fB\-\-yes\fR]
|
|
[\fB\-c\fR \fICONFIG\fR]
|
|
[\fB\-\-dry\-run\fR]
|
|
[\fB\-\-reboot\fR]
|
|
[\fB\-\-no\-remediation\fR]
|
|
[\fB\-\-skip\-preflight\fR]
|
|
[\fB\-v\fR|\fB\-\-verbose\fR]
|
|
[\fB\-\-json\fR]
|
|
[\fICOMMAND\fR] [\fIARGS...\fR]
|
|
|
|
.SH DESCRIPTION
|
|
.B linux-updater
|
|
is a standalone, zero-dependency Python 3 utility designed to reliably inspect system health, perform safe automated remediations, and execute updates across major Linux distributions including Debian, Ubuntu, Red Hat Enterprise Linux (RHEL 8 & 9), Fedora, AlmaLinux, Rocky Linux, and Arch Linux.
|
|
|
|
Before applying updates, \fBlinux-updater\fR executes comprehensive pre-flight health checks:
|
|
.IP \(bu 2
|
|
Free disk space verification on \fB/boot\fR (min 250MB), \fB/var\fR (min 1GB), and root \fB/\fR (min 1GB).
|
|
.IP \(bu 2
|
|
Package manager lock detection and advisory locking inspections (\fBfcntl.flock\fR).
|
|
.IP \(bu 2
|
|
Package database consistency inspection and safe remediation of interrupted transactions (\fBdpkg \-\-configure \-a\fR, \fBapt\-get install \-f\fR, \fBdnf clean all\fR).
|
|
.IP \(bu 2
|
|
Memory availability and low-RAM/OOM risk detection via \fB/proc/meminfo\fR.
|
|
.IP \(bu 2
|
|
AC power status detection on portable systems via \fB/sys/class/power_supply\fR.
|
|
.IP \(bu 2
|
|
Pending reboot detection from previously installed kernels or libraries.
|
|
|
|
If low disk space on \fB/var\fR is detected, \fBlinux-updater\fR safely purges cached packages. If an abandoned lock file is identified whose holder process is confirmed dead, it removes the stale lock. If an interrupted package installation transaction is detected, it executes automated repair.
|
|
|
|
.SH COMMANDS
|
|
.TP
|
|
.B update \fR[\fB\-\-packages \fIPKG...\fR] [\fB\-\-exclude \fIPATTERN...\fR] [\fB\-\-security\fR] [\fB\-\-flatpak\fR]
|
|
Runs pre-flight diagnostics, auto-remediates safe issues, checks for available updates, prompts for user confirmation (unless \fB\-y\fR is provided), applies routine package upgrades, and reports reboot status. When \fB\-\-packages\fR is specified, updates only the named packages. When \fB\-\-exclude\fR is specified, skips packages matching the names or glob patterns. When \fB\-\-security\fR is specified, installs only security updates. When \fB\-\-flatpak\fR is specified, updates Flatpak applications after OS packages.
|
|
.TP
|
|
.B check \fR[\fB\-\-exclude \fIPATTERN...\fR] [\fB\-\-security\fR]
|
|
Non-destructively inspects pre-flight health diagnostics and lists all pending package upgrades without modifying system state.
|
|
.TP
|
|
.B release\-upgrade \fR[\fB\-t \fITARGET\fR|\fB\-\-target\-release \fITARGET\fR|\fB\-\-releasever \fITARGET\fR]
|
|
Executes a major OS distribution upgrade (e.g. Debian 12 to 13, Ubuntu 22.04 to 24.04, Fedora 43 to 44, or RHEL/AlmaLinux leapp upgrade). On Fedora, the target release version is mandatory via \fB\-t\fR or \fB\-\-releasever\fR. Requires explicit user confirmation unless \fB\-y\fR is passed.
|
|
.TP
|
|
.B clean \fR[\fB\-\-all\fR]
|
|
Cleans the local package cache. When \fB\-\-all\fR is given, also removes unused orphaned dependencies.
|
|
.TP
|
|
.B health
|
|
Runs pre-flight system diagnostics and prints a formatted health report (or JSON with \fB\-\-json\fR) without performing updates.
|
|
.TP
|
|
.B completion \fR[\fBbash\fR|\fBzsh\fR]
|
|
Outputs shell tab completion script to stdout for evaluation or installation into shell profiles.
|
|
|
|
.SH OPTIONS
|
|
.TP
|
|
.BR \-y ", " \-\-yes ", " \-\-non\-interactive
|
|
Bypasses interactive confirmation prompts. Required for cron, systemd timers, and automated orchestration.
|
|
.TP
|
|
.BR \-c " \fIPATH\fR, " \-\-config " \fIPATH\fR"
|
|
Specifies the path to an alternative JSON configuration file (default: \fI/etc/linux-updater.json\fR).
|
|
.TP
|
|
.B \-\-dry\-run
|
|
Simulates update operations without altering package states on disk.
|
|
.TP
|
|
.B \-\-reboot
|
|
Automatically reboots the system after a major release upgrade or routine update (if a reboot is required). On Fedora release upgrades, automatically executes offline transaction reboot (\fBdnf5 \-y offline reboot\fR). In interactive mode when this option is omitted, the user is prompted to confirm immediate reboot.
|
|
.TP
|
|
.BR \-\-exclude " \fIPATTERN...\fR"
|
|
Exclude package(s) or glob patterns (e.g. 'kernel*', 'nginx') from update operations.
|
|
.TP
|
|
.B \-\-security
|
|
Restrict update operations strictly to security patches and vulnerability advisories. Supported on RHEL, Fedora, CentOS, Rocky, AlmaLinux, Debian, and Ubuntu.
|
|
.TP
|
|
.B \-\-flatpak
|
|
Execute Flatpak application updates (\fBflatpak update \-y\fR) after OS package manager operations complete.
|
|
.TP
|
|
.B \-\-no\-remediation
|
|
Disables automated remediation actions (such as clearing package caches, unlinking stale locks, or repairing interrupted transactions).
|
|
.TP
|
|
.B \-\-skip\-preflight
|
|
Bypasses all pre-flight health diagnostics.
|
|
.TP
|
|
.BR \-v ", " \-\-verbose
|
|
Enables verbose output and logs every executed subprocess command to stderr.
|
|
.TP
|
|
.B \-\-json
|
|
Formats CLI outputs as structured JSON for consumption by monitoring tools (e.g., Zabbix, Nagios) and automation scripts.
|
|
.TP
|
|
.B \-\-version
|
|
Displays the software version and exits.
|
|
.TP
|
|
.BR \-h ", " \-\-help
|
|
Displays the command-line help summary.
|
|
|
|
.SH FILES
|
|
.TP
|
|
.I /etc/linux-updater.json
|
|
System configuration file containing disk thresholds, behavior switches, and logging directory settings.
|
|
.TP
|
|
.I /etc/logrotate.d/linux-updater
|
|
Logrotate policy rotating updater logs weekly, keeping 4 archives compressed with 0640 permissions.
|
|
.TP
|
|
.I /var/log/linux-updater/
|
|
Standard directory for execution logs conforming to Linux FHS. Each execution creates a timestamped file \fIlinux-updater-YYYYMMDD-HHMMSS.log\fR.
|
|
.TP
|
|
.I /var/log/linux-updater/latest.log
|
|
Atomic symbolic link pointing to the most recent execution log file.
|
|
.TP
|
|
.I /usr/share/bash-completion/completions/linux-updater
|
|
Static Bash command and argument autocompletion definition.
|
|
.TP
|
|
.I /usr/share/zsh/site-functions/_linux-updater
|
|
Static Zsh command and argument autocompletion definition.
|
|
|
|
.SH EXIT STATUS
|
|
.TP
|
|
.B 0
|
|
Success. All requested actions finished cleanly and no reboot is needed.
|
|
.TP
|
|
.B 1
|
|
General error (pre-flight checks failed and could not be remediated, or package manager command failed).
|
|
.TP
|
|
.B 2
|
|
Success with reboot required. Updates were applied successfully, but a kernel or critical library upgrade requires a system reboot.
|
|
.TP
|
|
.B 3
|
|
Operation aborted by user at interactive confirmation prompt.
|
|
|
|
.SH EXAMPLES
|
|
.PP
|
|
Run pre-flight health checks and output JSON:
|
|
.RS
|
|
.B linux-updater health \-\-json
|
|
.RE
|
|
.PP
|
|
Simulate routine system update without changing system state:
|
|
.RS
|
|
.B linux-updater update \-\-dry\-run
|
|
.RE
|
|
.PP
|
|
Apply routine updates non-interactively:
|
|
.RS
|
|
.B linux-updater \-y update
|
|
.RE
|
|
.PP
|
|
Apply security updates only:
|
|
.RS
|
|
.B linux-updater \-y update \-\-security
|
|
.RE
|
|
.PP
|
|
Apply updates excluding kernel packages:
|
|
.RS
|
|
.B linux-updater \-y update \-\-exclude "kernel*"
|
|
.RE
|
|
.PP
|
|
Selectively update only the openssl and nginx packages:
|
|
.RS
|
|
.B linux-updater \-y update \-\-packages openssl nginx
|
|
.RE
|
|
.PP
|
|
Simulate major distribution upgrade to target version:
|
|
.RS
|
|
.B linux-updater release\-upgrade \-\-dry\-run \-t 41
|
|
.RE
|
|
.PP
|
|
Install shell completions for Bash:
|
|
.RS
|
|
.B eval "$(linux-updater completion bash)"
|
|
.RE
|
|
|
|
.SH SEE ALSO
|
|
.BR apt-get (8),
|
|
.BR dnf (8),
|
|
.BR pacman (8)
|
|
|
|
.SH AUTHORS
|
|
Linux System Updater Team. Released under the MIT License.
|