---
title: "How to free up Xcode disk space safely with an AI Agent"
url: https://daily.dev/posts/how-to-free-up-xcode-disk-space-safely-with-an-ai-agent-bit19tdf4
source_url: https://www.avanderlee.com/ai-development/how-to-free-up-xcode-disk-space-safely-with-an-ai-agent
type: article
source: "SwiftLee"
published: 2026-07-27T08:36:06.214Z
updated: 2026-07-27T08:37:13.205Z
tags: ["ai-agents", "ios", "xcode"]
reading_time: 11
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to free up Xcode disk space safely with an AI Agent

**[SwiftLee](https://daily.dev/sources/avanderlee)** · 11 min read · 0 upvotes · 0 comments

## Summary

Xcode disk usage grows fast, especially with agentic development workflows using multiple Git worktrees. The author created an open-source Xcode Disk Cleanup Agent Skill that audits Derived Data, Simulators, archives, DeviceSupport, and caches before proposing any deletions. The skill uses a deterministic Python script to produce structured JSON output, keeping token usage low. It integrates with tools like Cursor, Claude Code, and Codex via the npx skills command. Cleanup is always approval-gated — nothing is deleted without explicit user confirmation, and irreversible operations like Simulator removal require a second confirmation. Archives are handled conservatively: distributed archives and the newest undistributed archive are preserved. The skill can also be triggered automatically when an agent detects low storage during a build or download failure.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.avanderlee.com/ai-development/how-to-free-up-xcode-disk-space-safely-with-an-ai-agent>

## Similar posts on daily.dev

- [Xcode Build Optimization using 6 Agent Skills](https://daily.dev/posts/xcode-build-optimization-using-6-agent-skills-f8vrkuuiw) · SwiftLee · 1 upvotes · 0 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#ios](https://daily.dev/tags/ios), [#xcode](https://daily.dev/tags/xcode)

[View this post on daily.dev](https://daily.dev/posts/how-to-free-up-xcode-disk-space-safely-with-an-ai-agent-bit19tdf4)
