---
title: clean
---

import VersionLabel from '@site/src/components/Docs/VersionLabel';

The `moon clean` command will clean the current workspace by deleting stale cache. For the most
part, the action pipeline will clean automatically, but this command can be used to reset the
workspace entirely.

```shell
$ moon clean

# Delete cache with a custom lifetime
$ moon clean --lifetime '24 hours'
```

### Options

- `--all` - Clean all cached items and reset state. <VersionLabel version="2.0.0" />
- `--lifetime` - The maximum lifetime of cached artifacts before being marked as stale. Defaults to
  "7 days".
