- Home
- Skills
- DevOps & Cloud
- Free Disk on a Live Trading Host Without Downtime
Free Disk on a Live Trading Host Without Downtime
Safe disk cleanup on a live trading host: scout, build a categorised deletion manifest with safety checks, get one explicit approval, delete, keep a ledger of removed binaries, and prove the trader kept its PID.
$7
What it does
- Scans the server to find the largest folders and old service backups
- Checks if files are currently open or locked by a running process before suggesting deletion
- Creates a ledger of deleted files including their version details for future audits
- Fixes common log rotation bugs that prevent old logs from being compressed
- Verifies your trading process ID remains unchanged after the cleanup is finished
Who it's for
Founders running a live trading bot
Free up server space without stopping your bot or losing money.
Try asking: “Check my trading server for files I can safely delete.”
DevOps for financial services
Clean production hosts with a permanent record of which binaries were deleted.
Try asking: “Build a cleanup manifest for the main trading host.”
Freelance server admins
Fix log rotation issues and clear caches on Linux servers safely.
Try asking: “Fix the log compression issue on this server.”
Free Disk on a Live Trading Host Without Downtime
Example session with this skill installed
The disk on my trading host is at 93 percent. Free some space but do not restart or disturb the trader.
- Read your context and instructions
- Compiled the free disk on
Example on a fictional host (your-staging-host, disk 93 percent). Following server-disk-cleanup the agent first scouted read-only: 14 GB of 20 GB sat in three places, rotated PM2 logs (5.1 GB, uncompressed), old rollback binaries (3.8 GB across 9 files), and a package cache (1.2 GB).
manifest.sh produced a categorised list with a verdict per item. The binary currently executing was marked KEEP because the process executable link pointed at it; two files showed an open handle from a log tailer and were marked HOLD; one rollback binary had a hard link elsewhere and was marked KEEP. Rotated logs older than 7 days and the 6 oldest rollback binaries were marked DELETE, keeping the newest three.
The agent showed the manifest (about 7.4 GB reclaimable) and asked for a single approval. After a yes it ran ledger.sh to record sha256 and build info for each binary, then execute.sh. Result: disk at 52 percent, trader PID and start time unchanged, restart count unchanged. It also applied the pm2-logrotate compress fix so rotated logs shrink in future, and nothing outside the approved list was removed.
Connects securely to your tools. The creator never sees your data.
About this skill
A full disk on a host that is trading is an emergency where the wrong rm can be worse than the problem. This skill gives an agent a conservative, auditable cleanup that never touches the running processes.
What is inside:
- SKILL.md - the procedure: scout what is large and why, build a categorised manifest (rollback binaries, rotated logs, caches, build leftovers) with safety checks per item (is it the running executable, does a process hold it open, does it have hard links, is it referenced by a config or a socket), show the manifest and ask once, delete, then prove the trader's PID and start time did not change. It also covers stopping the host from refilling after every deploy.
- scripts/manifest.sh - builds the candidate list with the safety checks, deleting nothing.
- scripts/ledger.sh - records each binary's identity (mtime, sha256, Go version, module lines) before it is deleted, so "which build ran during that incident" stays answerable.
- scripts/execute.sh - deletes exactly the approved manifest.
- scripts/pm2-logrotate-compress-fix.sh - repairs pm2-logrotate so rotated logs get compressed.
For operators of their own trading hosts. Deletion always waits for your explicit approval of the manifest. Needs SSH, sudo and bash. Also part of the Crypto Trading Ops Playbooks pack at a lower per-skill price.
This skill requires sudo access on the host. It does not automatically delete Docker volumes to avoid data loss.
Built for Linux hosts running trading services under PM2. Uses SSH for scouting and scp to deploy bash scripts (manifest.sh, ledger.sh, execute.sh). Performs safety checks via lsof and fuser to identify open file descriptors and running executables. Captures Go module pins from ELFs using strings for the audit ledger. Includes a specific patch for pm2-logrotate 3.0.0 boolean casting bugs.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 1 day ago
- Software
- bash and standard coreutils (du, find, lsof, stat)
pm2-logrotate if you use the log-rotation fix.
Permissions
What's inside
Frequently Asked Questions
New in DevOps & Cloud
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for DevOps & Cloud.