Removing Components

This section addresses removing components from your workspace. If your intention is to delete the component from the remote scope, please refer to Deleting components.

Removing components from your Bit workspace allows you to declutter and organize without affecting the component's global availability or its instances in other workspaces.

Remove components from a workspace

Run the following to remove a component from your workspace:

$bit
Copiedcopy
See command synopsis

The output should be similar to the following:

successfully removed components from the local scope (to remove from the remote scope, please re-run the command with --remote flag):
foo/bar

A component will not be removed if it is used by another staged component (i.e, a component that was snapped but not exported, yet). If you still want to remove it, use the --force flag. (this is not recommended as the dependent component will be corrupted).

Ejecting components

To stop maintaining a versioned component, e.g. after it has been exported or if you dont need the local changes, 'eject' it from your workspace. This will remove the component from the workspace and install its package instead (for consumption only).

$bit
Copiedcopy
See command synopsis

Alternatively, you can eject components as part of the export command.

Deleting components

Deleting a component both removes it from your workspace and deletes it on the remote after export.

Learn more on Deleting components