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.
Run the following to remove a component from your workspace:
The output should be similar to the following:
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).
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).
Alternatively, you can eject components as part of the export command.
Deleting a component both removes it from your workspace and deletes it on the remote after export.
Learn more on Deleting components