disk-cleanup

Recover lyric-lang dev environments from ENOSPC disk exhaustion by truncating files and reclaiming caches.

Updated Apr 29, 2026
One-click install
npx skills add https://github.com/nichobbs/lyric-lang --skill disk-cleanup-nichobbs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: disk-cleanup
Source: https://github.com/nichobbs/lyric-lang/tree/main/.claude/skills/disk-cleanup
Command: npx skills add https://github.com/nichobbs/lyric-lang --skill disk-cleanup-nichobbs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you recover a stuck lyric-lang development environment when the root disk is full (ENOSPC), especially when Bash can’t even start due to failure writing Claude session-env files.

Core Features & Use Cases

  • Deadlock recovery without Bash: Truncates selected text files in-place (via Read then Write with empty content) to free space when shell access is unavailable.
  • Bulk reclaim with Bash: Removes regenerated build artifacts under typical compiler/test directories and cleans up large /tmp emitter caches.
  • Validation and root-cause guidance: Uses df -h / to confirm recovery and explains how to diagnose deleted-but-still-open files with lsof and /proc.

Quick Start

Use the disk-cleanup skill when you see an ENOSPC “no space left on device” error and you need to restore enough free space for Bash commands to run again.

Frequently Asked Questions about disk-cleanup

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

FAQPage Schema
How do I recover from ENOSPC disk full errors when Bash fails to run any commands?

To recover from ENOSPC disk full errors when Bash is deadlocked, truncate selected large text files in-place using Read and Write operations to free space, then use safe find-and-remove patterns on build artifacts and tmp caches once Bash is available again.

Why does my root filesystem show 100% usage and Claude session initialization fails?

Your root filesystem shows 100% usage and Claude session initialization fails because disk exhaustion prevents writing session-env files. Wedged session initialization and accumulated build or test artifacts can cause Bash tool invocations to fail before running any command.

What's the best way to reclaim disk space from build artifacts and tmp emitter caches?

The best way to reclaim disk space from build artifacts and tmp emitter caches is applying safe find-and-remove patterns to typical compiler and test directories, clearing large /tmp caches, and validating recovery with df -h /.

How do I truncate large text files when shell access is unavailable due to no space left on device?

To truncate large text files when shell access is unavailable due to no space left on device, use Read to identify the files, then Write with empty content to truncate them in-place without relying on Bash execution.

Can I diagnose deleted-but-still-open files after disk cleanup using lsof and /proc?

Yes, you can diagnose deleted-but-still-open files after disk cleanup using lsof and /proc to identify processes still holding file handles, which can prevent reclaimed space from registering on the root filesystem.

Does this disk cleanup approach work for lyric-lang dev environments specifically?

Yes, this disk cleanup approach works for lyric-lang dev environments specifically, targeting the exact build artifacts, test directories, and tmp emitter caches generated by the dotnet build and test workflows in that environment.