Free Disk on a Live Trading Host Without Downtime

    by Claude Workflow Lab

    1

    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

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Terminal / Shell
    Read Files
    Write Files
    Listed1 day ago

    What's inside

    Frequently Asked Questions

    This skill helps free up disk space on a live trading server without stopping the bot or changing its process ID. It identifies safe items to delete such as old binary backups, temporary files, and hidden caches while ensuring no active trading files or sockets are touched.

    You need a Linux host running trading services under PM2 and SSH access to that server. You also need to provide the specific folder names for your services and the names of your apps in PM2 so the cleanup scripts know what to protect.

    It performs safety checks to see if a file is currently being used by a running process or held open by a log tool. It also checks for hard links and references in system files to make sure deleting a file won't cause a crash or lose the only copy of important data.

    You receive a categorized manifest of files suggested for removal, a ledger that records the details and version history of deleted binaries, and a final confirmation that your trading process is still running with the same ID. It also provides a fix for common logging issues where files are not being compressed correctly.

    This skill is designed for specific file types like logs and backups, so it does not automatically handle Docker volumes or database data. It also avoids deleting important provenance files that record which specific code version was used for a build.

    You can ask your agent to scout your server for large folders or tell it you have a no space left on device error and need a safe cleanup. You will then be asked to review a list of files and provide a single approval before any deletions happen.

    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.