Skip to main content
The clean command removes cached data and artifacts from your workspace to help resolve issues or free up disk space.
same clean [flags]

Behavior

By default, when run without any flags, the clean command removes the Build Info Store, which contains the cache of task outputs and execution metadata. This is useful when you want to force a clean rebuild of all tasks.

Flags

--tools

Short flag: -t Removes the tool resolution caches, including NixHub and Environment caches. This is useful if tool provisioning is broken or you’re experiencing issues with tools not being resolved correctly.
same clean --tools

--all

Short flag: -a Removes all caches, including Build, Tools, and Environments. This performs a complete cleanup of all cached data.
same clean --all

Examples

Clean only the build cache (default behavior):
same clean
Clean only the tool resolution caches:
same clean --tools
Clean all caches:
same clean --all
Clean all caches using the short flag:
same clean -a