<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> ## Current Behavior <!-- This is the behavior we have today --> `nx reset` doesn't remove marker files used by nx cloud. ## Expected Behavior `nx reset` removes marker files from nx cloud ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #https://github.com/nrwl/nx/issues/23308
81 lines
1.6 KiB
Markdown
81 lines
1.6 KiB
Markdown
---
|
|
title: 'reset - CLI command'
|
|
description: 'Clears cached Nx artifacts and metadata about the workspace and shuts down the Nx Daemon.'
|
|
---
|
|
|
|
# reset
|
|
|
|
Clears cached Nx artifacts and metadata about the workspace and shuts down the Nx Daemon.
|
|
|
|
## Usage
|
|
|
|
```shell
|
|
nx reset
|
|
```
|
|
|
|
Install `nx` globally to invoke the command directly using `nx`, or use `npx nx`, `yarn nx`, or `pnpm nx`.
|
|
|
|
### Examples
|
|
|
|
Clears the internal state of the daemon and metadata that Nx is tracking. Helpful if you are getting strange errors and want to start fresh:
|
|
|
|
```shell
|
|
nx reset
|
|
```
|
|
|
|
Clears the Nx Cache directory. This will remove all local cache entries for tasks, but will not affect the remote cache:
|
|
|
|
```shell
|
|
nx reset --only-cache
|
|
```
|
|
|
|
Stops the Nx Daemon, it will be restarted fresh when the next Nx command is run.:
|
|
|
|
```shell
|
|
nx reset --only-daemon
|
|
```
|
|
|
|
Clears the workspace data directory. Used by Nx to store cached data about the current workspace (e.g. partial results, incremental data, etc):
|
|
|
|
```shell
|
|
nx reset --only-workspace-data
|
|
```
|
|
|
|
## Options
|
|
|
|
### help
|
|
|
|
Type: `boolean`
|
|
|
|
Show help
|
|
|
|
### onlyCache
|
|
|
|
Type: `boolean`
|
|
|
|
Clears the Nx cache directory. This will remove all local cache entries for tasks, but will not affect the remote cache.
|
|
|
|
### onlyCloud
|
|
|
|
Type: `boolean`
|
|
|
|
Resets the Nx Cloud client. NOTE: Does not clear the remote cache.
|
|
|
|
### onlyDaemon
|
|
|
|
Type: `boolean`
|
|
|
|
Stops the Nx Daemon, it will be restarted fresh when the next Nx command is run.
|
|
|
|
### onlyWorkspaceData
|
|
|
|
Type: `boolean`
|
|
|
|
Clears the workspace data directory. Used by Nx to store cached data about the current workspace (e.g. partial results, incremental data, etc)
|
|
|
|
### version
|
|
|
|
Type: `boolean`
|
|
|
|
Show version number
|