Get the FREE Ultimate OpenClaw Setup Guide →

remote-system-maintenance

Scanned
npx machina-cli add skill aiskillstore/marketplace/remote-system-maintenance --openclaw
Files (1)
SKILL.md
3.1 KB

Remote System Maintenance

Purpose

Structured guidance for diagnosing and maintaining remote Linux systems through SSH/tmux sessions, with emphasis on Ubuntu/Debian platforms.

Applicable Scenarios

  • System maintenance tasks
  • Disk space recovery
  • Package updates
  • Health diagnostics
  • Cleanup operations on remote servers

Three-Phase Approach

Phase 1: Initial Diagnostics

Capture baseline system state:

  • Hostname and system identification
  • Resource utilization (disk, memory, CPU)
  • Process status and load
  • Zombie process detection

Phase 2: System Log Review

Examine system health indicators:

  • Recent error messages in system logs
  • Journal disk consumption analysis
  • Critical service status
  • Authentication and security events

Phase 3: Package Assessment

Identify maintenance opportunities:

  • Upgradable packages
  • Orphaned configurations
  • Unused dependencies
  • Package cache size

Ubuntu/Debian Cleanup Sequence

Execute these seven stages in order:

  1. Package Cache Refresh - apt update to sync package lists
  2. System Upgrades - apt upgrade for security and bug fixes
  3. Orphan Removal - apt autoremove to clean unused dependencies
  4. Cache Purging - apt clean to reclaim package cache space
  5. Journal Pruning - journalctl --vacuum-time=7d to limit log retention
  6. Snap Revision Cleanup - Remove disabled snap revisions (see below)
  7. Temporary Directory Assessment - Review /tmp and /var/tmp for cleanup opportunities

Snap Revision Cleanup Technique

Snap keeps old revisions by default. To identify and remove:

# List all disabled snap revisions
snap list --all | awk '/disabled/{print $1, $3}'

# Remove specific revision
snap remove <package-name> --revision=<revision-number>

Important: Requires explicit removal by revision number, not simple package uninstallation.

Documentation Requirements

All maintenance sessions must generate structured logs recording:

  1. System Identification

    • Hostname
    • OS version
    • Kernel information
    • Operator identity
  2. Resource States

    • Initial disk/memory/CPU usage
    • Final disk/memory/CPU usage
    • Quantified improvements
  3. Actions Taken

    • Specific commands executed
    • MB/GB freed per category
    • Packages upgraded/removed
  4. Follow-up Recommendations

    • Remaining issues
    • Future maintenance needs
    • Monitoring suggestions

Expected Results

Real-world recovery examples:

  • Journal vacuuming: 300-600 MB
  • Snap revision cleanup: 500 MB to 2 GB
  • Package cache purging: 100-500 MB
  • Total potential: 2+ GB in comprehensive sessions

Time Commitment

Typical maintenance session: 15-30 minutes including diagnostics, cleanup, and documentation.

Source

git clone https://github.com/aiskillstore/marketplace/blob/main/skills/2389-research/remote-system-maintenance/SKILL.mdView on GitHub

Overview

Provides structured, three-phase guidance for diagnosing and maintaining remote Linux hosts via SSH/tmux, with a focus on Ubuntu/Debian. It helps ensure system health, frees disk space, and keeps packages up to date.

How This Skill Works

It operates over SSH/tmux to guide you through a three-phase checklist: Phase 1 collects baseline host data (hostname, OS, kernel, resources, processes, zombie state); Phase 2 reviews system logs, journal usage, service status, and security events; Phase 3 assesses packages for upgrades, orphaned configurations, unused dependencies, and cache size. After assessment, it executes the Ubuntu/Debian cleanup sequence (seven stages) and logs all actions with quantified results.

When to Use It

  • System maintenance tasks on remote servers
  • Disk space recovery and cleanup
  • Package updates and security fixes
  • Health diagnostics for Linux hosts
  • Cleanup operations on remote servers

Quick Start

  1. Step 1: Connect to the remote host via SSH and start a tmux session.
  2. Step 2: Run Phase 1–3 diagnostics to capture baseline metrics and health indicators.
  3. Step 3: Execute the seven-stage Ubuntu/Debian cleanup sequence and generate structured logs.

Best Practices

  • Always start with a baseline capture: hostname, OS version, kernel, and current resource usage.
  • Review logs and journal consumption before performing cleanup to avoid missing issues.
  • Follow the seven-stage Ubuntu/Debian cleanup sequence in order (update, upgrade, autoremove, clean, journal prune, snap cleanup, tmp review).
  • Document actions with quantified outcomes (MB/GB freed, packages upgraded or removed).
  • Identify and remove old Snap revisions explicitly using revision numbers, not by package uninstall.

Example Use Cases

  • Journal vacuuming: 300-600 MB reclaimed.
  • Snap revision cleanup: 500 MB to 2 GB recovered.
  • Package cache purging: 100-500 MB freed.
  • Total potential cleanup: 2+ GB in comprehensive sessions.
  • Typical maintenance session: 15-30 minutes including diagnostics and documentation.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers