# 4d Clean Project

> Clean a 4D project by removing generated files, caches, and system artifacts.

- Skill: `e-marchand/4d-clean-project` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add e-marchand/4d-clean-project`
- Raw SKILL.md: https://api.skillmd.com/api/skills/e-marchand/4d-clean-project/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: e-marchand (https://skillmd.com/u/e-marchand)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/e-marchand/4d-clean-project

---


# 4D Project Cleaner

Remove generated files and caches from a 4D project.

## Usage

The script auto-detects the project root by finding the `.4DProject` file.

```bash
# From anywhere inside the project
python scripts/clean.py

# Or specify a path
python scripts/clean.py /path/to/4d-project
```

The script reports what was removed.

## What Gets Removed

| Item | Location | Description |
|------|----------|-------------|
| DerivedData/ | Recursive | Compilation cache |
| Libraries/ | Root | Runtime libraries |
| userPreferences.*/ | Root | User-specific settings |
| Project/Trash/ | Root | Deleted items |
| Logs/* | Root | Log file contents |
| .DS_Store | Recursive | macOS folder metadata |
| ehthumbs.db | Recursive | Windows thumbnail cache |
| Thumbs.db | Recursive | Windows thumbnail cache |
