remote-system-maintenance
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:
- Package Cache Refresh -
apt updateto sync package lists - System Upgrades -
apt upgradefor security and bug fixes - Orphan Removal -
apt autoremoveto clean unused dependencies - Cache Purging -
apt cleanto reclaim package cache space - Journal Pruning -
journalctl --vacuum-time=7dto limit log retention - Snap Revision Cleanup - Remove disabled snap revisions (see below)
- Temporary Directory Assessment - Review
/tmpand/var/tmpfor 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:
-
System Identification
- Hostname
- OS version
- Kernel information
- Operator identity
-
Resource States
- Initial disk/memory/CPU usage
- Final disk/memory/CPU usage
- Quantified improvements
-
Actions Taken
- Specific commands executed
- MB/GB freed per category
- Packages upgraded/removed
-
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.
More from 2389-research/claude-plugins
binary-re:static-analysis
Use when analyzing binary structure, disassembling code, or decompiling functions. Deep static analysis via radare2 (r2) and Ghidra headless - function enumeration, cross-references (xrefs), decompilation, control flow graphs. Keywords - "disassemble", "decompile", "what does this function do", "find functions", "analyze code", "r2", "ghidra", "pdg", "afl
15binary-re:tool-setup
Use when reverse engineering tools are missing, not working, or need configuration. Installation guides for radare2 (r2), Ghidra, GDB, QEMU, Frida, binutils, and cross-compilation toolchains. Keywords - "install radare2", "setup ghidra", "r2 not found", "qemu missing", "tool not installed", "configure gdb", "cross-compiler
14firebase-development:debug
This skill should be used when troubleshooting Firebase emulator issues, rules violations, function errors, auth problems, or deployment failures. Triggers on "error", "not working", "debug", "troubleshoot", "failing", "broken", "permission denied", "emulator issue".
13css-development:create-component
This skill should be used when creating new styled components or adding new CSS classes. Triggers on "create component", "new button", "new card", "add styles", "style component", "build UI element". Guides semantic naming, Tailwind composition, dark mode support, and test coverage.
13firebase-development:project-setup
This skill should be used when initializing a new Firebase project with proven architecture. Triggers on "new firebase project", "initialize firebase", "firebase init", "set up firebase", "create firebase app", "start firebase project". Guides through CLI setup, architecture choices, and emulator configuration.
13binary-re:synthesis
Use when ready to document findings, generate a report, or summarize binary analysis results. Compiles analysis findings into structured reports - correlates facts from triage/static/dynamic phases, validates hypotheses, generates documentation with evidence chains. Keywords - "summarize findings", "generate report", "document analysis", "what did we find", "write up results", "export findings
12