# Zc - a simple utility for deleting .zig-cache accross your system

**URL:** <https://ziggit.dev/t/zc-a-simple-utility-for-deleting-zig-cache-accross-your-system/13601>\
**Category:** Showcase\
**Tags:** language\
**Created:** [December 21, 2025, 1:47pm UTC](https://ziggit.dev/t/zc-a-simple-utility-for-deleting-zig-cache-accross-your-system/13601 "2025-12-21T13:47:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pierrelgol](https://ziggit.dev/user_avatar/ziggit.dev/pierrelgol/32/10233_2.png) [@pierrelgol](https://ziggit.dev/u/pierrelgol)\
**Post date:** [December 21, 2025, 1:47pm UTC](https://ziggit.dev/t/zc-a-simple-utility-for-deleting-zig-cache-accross-your-system/13601/1 "2025-12-21T13:47:03Z")

</div>

I just published [zc](https://github.com/pierrelgol/zigcleaner), a small Zig utility to clean up `.zig-cache` directories recursively.

The main motivation was practical (Zig caches piling up across many repos), but I also used this project as a way to get more familiar with **Zig’s new I/O interface** and concurrency patterns. The tool walks the filesystem, queues work, and deletes targets in parallel while reporting progress and stats.

It’s intentionally simple:

- one job
- fast (but that’s entirely based on the std lol)
- multithreaded (again thanks andrew)

You can run it on the current directory, point it at a workspace, dry-run it, or even repurpose it to clean other directories like `node_modules`.

Binaries are available in the releases, or it can be built from source with Zig master.

Feedback welcome, It’s also not tested on anything except my machine, I don’t think I’ve blundered badly, it won’t break your system, but still use it to your own detriment ahah.

Here is the output :

```bash
$ zc -d
Would delete ./workspace/zigcleaner_/.zig-cache
Would delete ./workspace/cean/cleanup/side-project/zig/test/standalone/windows_entry_points/.zig-cache
....
Would delete ./workspace/cean/cleanup/side-project/zig/test/standalone/ios/.zig-cache
Would delete ./workspace/cean/cleanup/side-project/zig/test/link/wasm/stack_pointer/.zig-cache

Statistics:
  Duration: 0.14s
  Directories: 178307 scanned
  Threads: 32 workers
  Potential Reclaim: 6.58 GB
  Throughput: 45.80 GB/s
  Peak RSS: 17.93 MB

```
