Files
linux-updater/docs/user-guide.md
T

5.0 KiB

Linux System Updater: User Guide

Welcome to the Linux System Updater (linux-updater) User Guide. This guide covers how to safely inspect and update your Linux workstation or server using linux-updater.


1. Overview & Philosophy

Updating a Linux system can occasionally fail due to preventable conditions:

  • /boot partition running out of inodes or disk space during kernel installation.
  • Leftover package manager lock files from crashed background processes.
  • Memory exhaustion causing package compilers or post-install scripts to fail.
  • Sudden laptop power loss during critical package unpacking.

linux-updater acts as an intelligent safety wrapper around your system's native package manager (apt, dnf, or pacman). Before making any modifications, it verifies that the system is in a healthy, safe state to upgrade.


2. Interactive CLI Workflow

Checking System Health (health)

To run a fast pre-flight diagnostic without checking for updates or altering system state:

linux-updater health

Example Output:

Linux System Updater v1.0.0
Detected System: Ubuntu 24.04.1 LTS (Family: debian)

Pre-flight Health Diagnostics:
-----------------------------------------------------------------
[ PASS ] disk_boot              /boot free space is sufficient: 1042MB
[ PASS ] disk_var               /var free space is sufficient: 42100MB
[ PASS ] disk_root              Root filesystem free space is sufficient: 42100MB
[ PASS ] lock_lock-frontend     No lock active at /var/lib/dpkg/lock-frontend
[ PASS ] lock_lock              No lock active at /var/lib/dpkg/lock
[ PASS ] lock_lock              No lock active at /var/lib/apt/lists/lock
[ PASS ] memory_available       Available RAM is sufficient: 7850MB
[ PASS ] pending_reboot         No pending system reboot detected.
-----------------------------------------------------------------
Overall Pre-flight Status: PASSED

Checking for Available Updates (check)

To see which packages have upgrades available without installing anything:

linux-updater check

Example Output:

Linux System Updater v1.0.0
Detected System: Fedora Linux 40 (Family: rhel)
Checking available updates...

Available Updates (3):
-----------------------------------------------------------------
• openssl.x86_64                 1:3.0.7-27 -> 1:3.0.7-28 (baseos)
• nginx.x86_64                   1.24.0-1 -> 1.24.0-2 (updates)
• curl.x86_64                    8.2.1-1 -> 8.2.1-2 (updates)
-----------------------------------------------------------------
Run 'linux-updater update' to apply updates.

Applying Routine System Updates (update)

To apply routine package upgrades interactively:

sudo linux-updater update
  1. Pre-flight Checks: Checks /boot, /var, /, locks, RAM, and power.
  2. Review: Shows list of available updates.
  3. Confirmation: Prompts Proceed with updates? [Y/n]:
  4. Execution: Runs native package upgrade transaction.
  5. Reboot Notice: Warns if a kernel or core library update requires a reboot.

Selective Package Updates (--packages)

If you only want to upgrade specific software (e.g. security patches for OpenSSL and Nginx) without touching the rest of the operating system:

sudo linux-updater update --packages openssl nginx

Simulation / Dry Run (--dry-run)

To simulate the complete update transaction without changing package states:

linux-updater update --dry-run

3. Major Distribution Release Upgrade (release-upgrade)

A major distribution upgrade transitions your system from one release version to the next (e.g., Ubuntu 22.04 LTS to 24.04 LTS, Debian 12 to 13, Fedora 40 to 41, or AlmaLinux 8 to 9).

Because major upgrades modify thousands of core system packages, linux-updater introduces strict safety gates:

# Simulate upgrade first:
linux-updater release-upgrade --dry-run -t 41

# Execute real upgrade:
sudo linux-updater release-upgrade -t 41

Safety Banner:

=================================================================
  WARNING: MAJOR DISTRIBUTION RELEASE UPGRADE
=================================================================
Target Release: 41
This operation performs a major upgrade of core system components.
Ensure you have a recent system backup or snapshot before proceeding.
=================================================================

Are you absolutely sure you want to proceed with upgrade to 41? [y/N]:

4. System Cleanup (clean)

To recover disk space occupied by old downloaded package files:

# Clean package download cache:
sudo linux-updater clean

# Clean cache AND remove orphaned dependencies:
sudo linux-updater clean --all

5. Reading System Logs

All execution logs are recorded in /var/log/linux-updater/:

# View the log from the most recent run:
cat /var/log/linux-updater/latest.log

# List historical execution logs:
ls -lh /var/log/linux-updater/

Each log line includes timestamped records of commands executed, exit codes, and diagnostics.