linux-server-audit

Audit Linux servers to remove bloat, clean caches, and apply low-memory kernel tuning.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/CHENHUI-X/toolbox --skill linux-server-audit-chenhui-x
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: linux-server-audit
Source: https://github.com/CHENHUI-X/toolbox/tree/main/custom-skills/devops/linux-server-audit
Command: npx skills add https://github.com/CHENHUI-X/toolbox --skill linux-server-audit-chenhui-x

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Inherited or long-running Linux servers accumulate resource-hungry services, orphaned packages, and bloated caches that degrade performance, especially on low-memory VPS instances. This Skill provides a systematic workflow to identify what is consuming CPU, memory, and disk, safely remove unnecessary software, and tune the kernel for constrained environments. ## Core Features & Use Cases - Resource Triage & Service Inventory: Rank processes by memory and CPU, list running and enabled systemd services, inspect listening ports, and map disk usage by directory. - Bloat Removal & Cache Cleanup: Remove common offenders like BT Panel, unused Docker, snapd, and Google Cloud agents, then reclaim space from APT, journald, npm, pip, and uv caches with explicit warnings about destructive pitfalls like deleting uv-managed Python directories. - Low-Memory Optimization: Apply sysctl kernel tuning (vfs_cache_pressure, dirty_ratio, tcp_fastopen), configure swap sizing and swappiness, and set systemd memory limits to prevent OOM kills on 1GB VMs. - Use Case: You inherit a 1GB GCP VPS running unknown software that feels sluggish. Run the audit workflow to discover snapd consuming 11% idle CPU and a crash-looping service, remove 4GB of bloat, and stabilize the server with swap and memory caps. ## Quick Start Audit this Linux server to find what is consuming resources, remove unnecessary services and caches, and optimize it for low memory.

Frequently Asked Questions about linux-server-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find what is slowing down my Linux server?

Start with process triage: run ps aux sorted by memory and CPU to find the biggest consumers, check free -h for memory pressure, and df -h for disk usage. Then list running systemd services and listening ports to spot unwanted software like panels or idle Docker daemons.

How do I permanently stop a Linux service that keeps restarting?

Use systemctl mask <service> --now instead of just stop and disable. Masking symlinks the unit to /dev/null, which blocks every activation path including dependency-driven starts that cause services like google-cloud-ops-agent to respawn.

Is it safe to delete the uv cache directory on Linux?

Only delete ~/.cache/uv or run uv cache clean, which removes downloaded wheels safely. Never delete ~/.local/share/uv/python because venvs created by uv symlink their Python interpreter there, and removing it breaks every such venv.

Why does dpkg fail with ldconfig not found on GCP VMs?

Non-interactive shells on GCP often lack /usr/sbin and /sbin in PATH, so dpkg cannot find ldconfig. Export PATH=$PATH:/usr/sbin:/sbin before running dpkg --configure -a or apt operations.

How much swap should a 1GB RAM Linux server have?

A 4GB swap file gives ample headroom for a 1GB VM running multiple services. Pair it with vm.swappiness=30 so active processes stay in RAM longer than the default 60 while still swapping before the OOM killer triggers.