Xpersona
D

Disk Cleanup

CLAWHUB · Unverified

Automated disk space cleanup and maintenance for OpenClaw deployments. Cleans 12 categories: memory SQLite orphan tmp files, SQLite VACUUM, Docker dangling i... Skill: Disk Cleanup Owner: yagebin79386 Summary: Automated disk space cleanup and maintenance for OpenClaw deployments. Cleans 12 categories: memory SQLite orphan tmp files, SQLite VACUUM, Docker dangling i... Tags: latest:1.0.0 Version history: v1.0.0 | 2026-03-24T21:42:59.764Z | user Initial release: 12-category automated disk cleanup for OpenClaw deployments. Tested: recovered 17GB (89%→44%) on production VPS. Arc

62
Rank
84
Safety
1.1k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: medium.

clawhub skill install s177j8hc2281phrzwj4rqkmnxs83hkz7:disk-cleanup
  1. Setup complexity is MEDIUM. Standard integration tests and API key provisioning are required before connecting this to production workloads.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-yagebin79386-disk-cleanup/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

7,086 characters of source documentation, loaded on request.

Extracted files

3 files captured from the source.

SKILL.md

---
name: disk-cleanup
description: >
  Automated disk space cleanup and maintenance for OpenClaw deployments.
  Cleans 12 categories: memory SQLite orphan tmp files, SQLite VACUUM,
  Docker dangling images/volumes/build cache, OpenClaw gateway logs,
  /tmp temp files, workspace backup artifacts, delivery queue stale entries,
  systemd journal vacuum, package manager caches (npm/yarn/pnpm/bun/prisma),
  rotated syslogs and btmp, git workspace gc, and stale migration artifacts
  (e.g. QMD models after backend switch). Use when: disk is filling up,
  after long-running deployments, as weekly cron maintenance, when
  disk usage exceeds 80%, when memory reindex leaves orphan .sqlite.tmp files,
  or when Docker images accumulate from sandbox rebuilds. Triggers on:
  disk cleanup, disk full, free space, storage maintenance, prune,
  vacuum, cleanup script, disk usage high.
---

# Disk Cleanup

Automated disk space recovery for OpenClaw deployments. Covers 12 cleanup categories that OpenClaw does not handle natively (as of 2026.3.13).

## What OpenClaw Already Handles (skip these)

- **Session store**: `session.maintenance` config (pruneAfter, maxEntries, rotateBytes)
- **Sandbox containers**: `sandbox.prune` config (idleHours, maxAgeDays)
- **Context pruning**: `contextPruning` config (cache-ttl mode)

## What This Skill Handles (the gaps)

| # | Category | Typical Growth | Trigger |
|---|----------|---------------|---------|
| 1 | Memory SQLite `.tmp-*` orphans | Hundreds of MB from failed reindex | Always |
| 2 | Memory SQLite VACUUM | Fragmentation after heavy use | `--aggressive` |
| 3 | Docker images/volumes/build cache | GB from sandbox rebuilds | Always |
| 4 | Gateway logs (`/tmp/openclaw/*.log`) | Grows daily | >3 days old |
| 5 | `/tmp` OpenClaw temp files | Patrol/board/cron artifacts | >24h old |
| 6 | Workspace `.prebind.*` backups | Hundreds of MB per backup | >7 days old |
| 7 | Delivery queue old entries | Grows with message volume | >7 days old |
| 8 | systemd journal | GB on default VPS configs | >500MB |
| 9 | npm/yarn/pnpm/bun/prisma/node-gyp cache | GB from skill/plugin installs | >100MB |
| 10 | Rotated syslogs + btmp | SSH brute-force logs on public VPS | Always |
| 11 | Git workspace `.git` | Auto-commit growth (board-move etc.) | >200MB |
| 12 | QMD/migration artifacts | Stale after backend switch | Auto-detected |

## Quick Start

Run directly:

```bash
# Preview what would be cleaned (safe, no deletions)
bash scripts/disk-cleanup.sh --dry-run

# Normal cleanup
bash scripts/disk-cleanup.sh

# Deep cleanup: includes SQLite VACUUM + aggressive git gc
bash scripts/disk-cleanup.sh --aggressive

# Cron mode: only outputs summary line
bash scripts/disk-cleanup.sh --quiet
```

## Schedule as Cron Job

Weekly Sunday 04:00 CET (recommended):

```
Use the cron tool:
  schedule: { kind: "cron", expr: "0 3 * * 0", tz: "Europe/Luxembourg" }
  payload: { kind: "agentTurn", message: "Run disk cleanup: bash scripts/disk-cleanup.sh --aggressiv

_meta.json

{
  "ownerId": "kn79j60et3ankd7a39kwdajath83hqd8",
  "slug": "disk-cleanup",
  "version": "1.0.0",
  "publishedAt": 1774388579764
}

skill-card.md

## Description:

Automated disk space cleanup and maintenance for OpenClaw deployments that removes stale SQLite, Docker, log, cache, workspace, delivery queue, journal, git, and migration artifacts.

This skill is ready for commercial/non-commercial use.

## Publisher:

[yagebin79386](https://clawhub.ai/user/yagebin79386)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and operators responsible for OpenClaw deployments use this skill to preview and run storage maintenance when disk usage is high, after long-running deployments, or as scheduled cleanup.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Live execution has broad destructive authority over logs, caches, Docker artifacts, workspace backups, delivery queue entries, and stale files.

Mitigation: Run with --dry-run first, review the reported targets and environment paths, and execute live cleanup only after confirming the deletion scope.

Risk: Host-level log cleanup can reduce retained system and security logs and can install a persistent journald size limit.

Mitigation: Avoid running as root unless host-wide log retention changes are accepted, and review the script before using unattended cron.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/yagebin79386/skills/disk-cleanup)

## Skill Output:

**Output Type(s):** [text, shell commands, configuration, guidance]

**Output Format:** [Markdown guidance with bash commands and a pipe-delimited cleanup summary]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [The bundled script supports dry-run, aggressive, and quiet modes; its final line reports CLEAN or CLEANED status.]

## Skill Version(s):

1.0.0 (source: server release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to Disk Cleanup and adjacent AI workflows.