Skip to content

Remove Workspaces

This guides will show you how to remove a workspaces from your monorepo.

NOTE

For safety reason, this command only removes the workspace from the workspaces field in the package.json file. It does not delete the workspace directory.

Usage

Use the following commands to remove a workspace:

bash
monopkg workspace remove [workspaces...]
bash
bun x monopkg workspace remove [workspaces...]
bash
npx monopkg workspace remove [workspaces...]
bash
yarn dlx monopkg workspace remove [workspaces...]

Examples

Remove the foo, bar, and baz workspaces from your monorepo:

bash
monopkg workspace remove foo bar baz
bash
bun x monopkg workspace remove foo bar baz
bash
npx monopkg workspace remove foo bar baz
bash
yarn dlx monopkg workspace remove foo bar baz

Released under the MIT License.