Skip to content
Castellan
Heiward's icon

Concept · Heiward

Read as

Heiward for developers, what your tools leave behind

With developer mode on, Heiward lists your repositories' build outputs, finished worktrees, merged branches, package caches, emulator images and temp files, beside their open pull requests, and cleans what you check.

Article
3904
Applies to
Heiward 1.9.108
Last reviewed
For
For developers
Written for Heiward 1.9.108; Heiward 1.11.4 is out now. Some of this may have changed: what's new is in its release notes.

Turn it on#

Developer mode in Heiward's Settings. With Castellan installed, Castellan's developer features decide instead: on when one of the developer staff is hired. See Hiring, switching and letting staff go.

Once a day, after a scheduled scan, Heiward looks for what development tools leave behind and make again when needed, and lists it in the Developer area, by repository. Nothing is cleaned until you press the button, or turn on automatic cleanup for it.

What it lists#

WhatHow it's recognisedChecked for you
Build outputs: node_modules, bin/obj, Gradle's, target, .venv, .nextThe project file beside it, so a folder that only has the name is left aloneIn projects untouched for 30 days
bin/obj with no project beside themWhat's left when a project is renamed or moved; nothing in it tracked by gitNever: each waits for you
Git worktreesThe repository's own listUntouched for 30 days, no uncommitted changes, every commit on a remote, and nothing working in it now
Package caches: Gradle, NuGet, npm, Yarn, pnpm, pip, Maven, Cargo, GoThe tools' own folders, or wherever their settings moved them (to a Dev Drive, say)Never. Blocked while the tool runs. The folder a tool used before its cache moved is checked: nothing uses it any more
Android emulators and system imagesThe emulator folder and the SDKSystem images no emulator uses. Blocked while an emulator runs
Temp files and crash dumpsUntouched for a day. Never the caches tools keep there on purposeYes. A folder a program still holds goes whole, or waits
AI coding assistants' session temp filesEach session's own folder in your Temp folder, measured a session at a timeOnce nothing in it has changed for a day. Never a session still running, one you can still resume, or one with a file open

Deletion never follows a link, leaves files in use alone, and checks each item again just before. What it has to leave, it names, with what holds it. Cleaning is quick, even on a Temp folder of millions of files: Heiward looks again only at what it listed, and deletes several folders at once.

A drive set to Scan only when I ask isn't read by the developer check at all. What it found there last stays listed, with the drive and when it was measured, until Scan this drive now checks it again, and automatic cleanup leaves it for you. To have the developer check keep cleaning such a drive (a Dev Drive with your temp files, say), set it to Scan automatically again.

Any version control is recognised: Git, Mercurial, Subversion, TFVC, Perforce, Plastic, Jujutsu and others. Worktrees and merged branches are git's; build outputs are found in all of them.

Merged branches#

Prune, on a repository with a remote, fetches, then deletes the local branches already merged into the remote's default branch. It never deletes main, master, develop, dev, trunk, or a branch checked out in a worktree, and never touches the remote's branches.

Open pull requests#

Beside each repository's cleanup, its open pull requests (the first five), with what each waits for: ready to merge, a review, changes, failing checks, conflicts, a draft. From GitHub, Azure DevOps and TFS, GitLab, Bitbucket, Gitea and Forgejo, with the sign-in Git or the host's own command line already keeps. Heiward never asks for one.

With Reeve and the Steward#

When Castellan's developer staff are there, Heiward leaves them their part:

  • With Reeve, worktrees and merged branches are Reeve's: Heiward shows the space worktrees take, but never checks their boxes or cleans them, and has no Prune.
  • With the Steward, pull requests are the Steward's: Heiward shows none.
  • Everything else is disk, and Heiward's: build outputs, package caches, temp files, crash dumps and emulator images.

Clean up by itself#

Under Automatic cleanup, in Settings, developer leftovers can go by themselves, of the kinds you pick: merged branches, temp files and crash dumps, build outputs and clean worktrees of projects untouched for 30 days, and unused emulator images. Package caches and emulators always wait for you.

Afterwards, its Last run line and the notification say each drive's free space before and after.

Is this page right?

If something on it is wrong or out of date, tell us and we'll fix the page.

Still stuck? Write to support@castellan-software.com and mention article 3904. Every version of Heiward, and what changed in it, is in its release notes.