143 lines
5.4 KiB
Plaintext
143 lines
5.4 KiB
Plaintext
.TH LINUX-UPDATER 8 "October 2026" "linux-updater 1.2.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
|
|
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.
|
|
|
|
.SH COMMANDS
|
|
.TP
|
|
.B update \fR[\fB\-\-packages \fIPKG...\fR]
|
|
Runs pre-flight diagnostics, cleans caches if needed, 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.
|
|
.TP
|
|
.B check
|
|
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.
|
|
|
|
.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
|
|
.B \-\-no\-remediation
|
|
Disables automated remediation actions (such as clearing package caches or unlinking stale locks).
|
|
.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 /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.
|
|
|
|
.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
|
|
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
|
|
|
|
.SH SEE ALSO
|
|
.BR apt-get (8),
|
|
.BR dnf (8),
|
|
.BR pacman (8)
|
|
|
|
.SH AUTHORS
|
|
Linux System Updater Team. Released under the MIT License.
|