Skip to main content

Overview

The tuist clean command removes cached artifacts from your local machine and optionally from remote storage. This helps reclaim disk space and resolve issues caused by corrupted or outdated cache files.

Usage

Arguments

string[]
The cache and artifact categories to clean. If no category is specified, everything is cleaned. Available categories:
  • plugins - Cached plugins
  • generatedAutomationProjects - Projects generated for automation tasks
  • projectDescriptionHelpers - Project description helpers cache
  • manifests - Manifests cache
  • editProjects - Temporary edit projects cache
  • runs - Tuist runs cache
  • binaries - Cached binary frameworks
  • selectiveTests - Selective testing cache
  • dependencies - Swift Package Manager build directory

Options

boolean
default:"false"
Clean the remote cache stored on Tuist Cloud. This removes cached binaries from the server.
string
default:"."
The path to the directory that contains the project to clean.
string
Short form of --path.

Examples

Clean all local artifacts

Removes all cached artifacts from your local machine.

Clean specific categories

Removes only cached binaries and manifests.

Clean plugin cache

Removes the plugins cache, useful when updating plugin versions.

Clean dependencies build directory

Removes the Swift Package Manager .build directory at the root of your project.

Clean remote cache

Cleans both local artifacts and removes cached binaries from Tuist Cloud.

Clean specific category with path

Cleans binaries cache for a project at a specific location.

When to use clean

You might want to run tuist clean when:
  • Freeing disk space: Cache directories can grow large over time
  • Resolving cache issues: Corrupted or outdated cache files causing build problems
  • After major changes: When switching between significantly different branches or project states
  • Plugin updates: After updating or removing plugins to clear stale plugin cache
  • Remote cache issues: Use --remote to clear problematic cached binaries from Tuist Cloud
Cleaning local cache is safe and reversible - artifacts will be regenerated or re-downloaded as needed. However, cleaning remote cache with --remote removes shared cached binaries for your entire team.