Disk Cleanup

WarnAudited by ClawScan on May 18, 2026.

Overview

This is a transparent disk-cleanup skill, but it can delete host-wide Docker/system/workspace data and can be scheduled to run unattended, so it needs review before use.

Use this only if you intentionally want host-level cleanup on the target machine. Start with `--dry-run`, avoid cron and `--aggressive` until you have reviewed the exact deletions, make sure OpenClaw is idle, and use it preferably on a dedicated OpenClaw deployment host with backups.

Findings (5)

Artifact-based informational review of SKILL.md, metadata, install specs, static scan signals, and capability signals. ClawScan does not execute the skill or run runtime probes.

What this means

Running the skill can remove logs, temp files, dangling Docker volumes, stopped containers, and build cache that other services may still need, causing data loss or service disruption.

Why it was flagged

The script performs forced live deletions and Docker prune operations. Docker pruning is host-wide and is not scoped to OpenClaw-labeled containers, images, volumes, or caches.

Skill content
safe_rm() { ... rm -rf "$target" ... } ... docker volume prune -f ... docker container prune -f --filter "until=48h" ... docker builder prune -f --filter "until=72h"
Recommendation

Run --dry-run first, use only on a dedicated OpenClaw host, and add allowlists/labels or confirmations before Docker and system-wide cleanup.

What this means

If cleanup runs while OpenClaw is actively reindexing memory, it could delete active temporary database files and break or corrupt that operation.

Why it was flagged

The script deletes every matching SQLite temporary file under the memory directory, with no visible age, lock, or process check to distinguish orphaned files from active reindexing files.

Skill content
done < <(find "$MEMORY_DIR" -name "*.sqlite.tmp-*" -print0 2>/dev/null)
Recommendation

Run cleanup only when OpenClaw is idle, or modify the script to require an age threshold and active-process/lock checks before deleting SQLite temporary files.

What this means

A cleanup mistake or overly broad rule could repeat weekly without obvious interactive review, and journal settings may remain changed after the cleanup run.

Why it was flagged

The skill recommends a recurring unattended agent run in aggressive quiet mode and describes a persistent system journal configuration change.

Skill content
payload: { kind: "agentTurn", message: "Run disk cleanup: bash scripts/disk-cleanup.sh --aggressive --quiet. Report results." } ... Journal vacuum installs a persistent 500MB limit to prevent regrowth
Recommendation

Do not schedule cron mode until a dry run and a manual live run have been reviewed; avoid --aggressive --quiet for recurring jobs unless the host is dedicated and monitored.

What this means

If run by a privileged user or on a shared Docker host, the skill can affect resources outside the intended OpenClaw deployment.

Why it was flagged

The script uses whatever Docker authority the current user has. Docker access can effectively grant broad host-level control, even though this is expected for deployment maintenance.

Skill content
if command -v docker &>/dev/null; then ... docker volume prune -f
Recommendation

Run with the least privilege that still accomplishes the cleanup, preferably on a dedicated deployment host, and avoid running it as root unless necessary.

What this means

Users have less external context for trusting or validating the maintenance script.

Why it was flagged

There is no remote install behavior, but the publisher/source provenance is limited for a shell script that performs destructive maintenance actions.

Skill content
Source: unknown; Homepage: none; No install spec — this is an instruction-only skill.
Recommendation

Review the included script contents and install only from a publisher or channel you trust.