Skip to Content
RcmadeDocs
Ray SecretsReferenceCLI ReferenceWorkspace

ray workspace unlink

Remove the Ray workspace link from the current directory

Remove the Ray workspace link from the current directory

Synopsis

ray workspace unlink [options]

Flags & Options

Flag / OptionTypeDescription
-y, --yes(--force)booleanAutomatically answer yes to all confirmation prompts (ideal for automated CI/CD scripts)
-a, --allbooleanPurge all local configuration state, including .ray/local.json, workspace metadata, and offline cache
--parentbooleanOperate on the nearest parent ancestor workspace instead of initializing a nested workspace

Common Examples

1. Interactive workspace unlinking

Removes .ray/workspace.json from the current directory after interactive confirmation.

ray workspace unlink

2. Non-interactive workspace unlinking

Removes the workspace link without interactive prompts for automated cleanup.

ray workspace unlink --yes

3. Purge all workspace configuration and local overrides

Deletes .ray/workspace.json, .ray/local.json, and local offline cache.

ray workspace unlink --yes --all

Exit Codes

CodeMeaningRecommended Action
0Success. The command completed with no errors.None required.
1Runtime or execution failure. A child process returned non-zero status or a general error occurred.Inspect process output or run with --verbose.
2Authentication failed. Token is missing, expired, or invalid.Run `ray login` or update `RAY_TOKEN`.
3Configuration or binding error. Project or environment context was not found.Run `ray init` or specify `--project` and `--env`.
4Network or API failure. Failed to reach the Ray Secrets vault.Check internet connection or run `ray doctor`.

Ready to eliminate plaintext secrets?

Create a workspace to organize environments, invite your team, and generate scoped Service Tokens for CI/CD.