clean
ajs dms clean removes generated workspaces: their node_modules, manifest cache, downloaded layers and build output. It says how much space it freed.
$ ajs dms clean --help
Usage: ajs dms clean [options]
Remove generated workspaces: their node_modules, manifest cache, downloaded
layers and build output.
Options:
-b, --backend-url <url> Backend URL whose workspace to remove;
DMS_API_BASE_URL is never read
-a, --all Remove every workspace, after a confirmation
-y, --yes Skip the confirmation of --all
-h, --help Show help for a command
One backend
-b removes the workspace keyed on that URL, the one build, start, prepare and dev -b share:
$ ajs dms clean -b http://localhost:5999
✔ Removed workspace ~/.antelopejs/dms-frontend/65325d65… · http://localhost:5999 · freed 129 B
It does not reach a workspace ajs dms dev created without -b, which is keyed on its project directory. Remove that one with --all, or find it with ajs dms workspaces.
Every workspace
--all lists what it removes and asks before removing it. The answer defaults to no.
$ ajs dms clean --all
Remove 7 workspaces (1.7 GB)?
8532f40f http://127.0.0.1:5050 url
f1ca086f http://127.0.0.1:5040 url
ada26b22 http://127.0.0.1:5030 url
1c7c7d66 http://127.0.0.1:5010 project /home/user/dms/packages/dms/playground
65325d65 http://127.0.0.1:5999 url
8aa5ac7c http://127.0.0.1:5050 project /home/user/tmp-docs-frontend-demo
d3ff131f http://127.0.0.1:5020 project /home/user/dms-ai/playground
│
◆ Continue?
│ ○ Yes / ● No
└
Without a terminal to ask on, such as in a pipe or in CI, it refuses unless --yes is given, and exits 2:
$ ajs dms clean --all < /dev/null
✖ Cannot prompt: this is not an interactive terminal
ajs dms clean --all needs an answer it cannot ask for when stdin is not a terminal or CI is set.
→ Pass it as a flag: ajs dms clean --all --yes
Never from the environment
clean deletes, so it takes its target from -b or --all only. It never reads DMS_API_BASE_URL, which a project's .env sets without anyone having a deletion in mind:
$ ajs dms clean
✖ Nothing to clean: pass -b <url> or --all
clean never uses DMS_API_BASE_URL from the environment or ./.env.
→ Remove the workspace build, start and dev -b share for a URL: ajs dms clean -b <url>
→ Remove every workspace, including those dev created without -b: ajs dms clean --all
→ List the workspaces: ajs dms workspaces