@nx/workspace:remove

Remove a project from the workspace.

Usage

1nx generate remove ... 2
1nx g rm ... #same 2

By default, Nx will search for remove in the default collection provisioned in workspace.json.

You can specify the collection explicitly as follows:

1nx g @nx/workspace:remove ... 2

Show what will be generated without writing to disk:

1nx g remove ... --dry-run 2

Examples

Remove my-feature-lib from the workspace:

1nx g @nx/workspace:remove my-feature-lib 2

Force removal of my-feature-lib from the workspace:

1nx g @nx/workspace:remove my-feature-lib --forceRemove 2

Options

projectName

projectRequired
string

The name of the project to remove.

forceRemove

boolean
Default: false

When true, forces removal even if the project is still in use.

importPath

string

The library name used at creation time

skipFormat

Internal
boolean
Default: false

Skip formatting files.