Skip to content

Deleting Packages

Use nubo del to remove packages from the current project.

Terminal window
nubo del github.com/nubolang/color

By default, deleting removes package metadata from the project.

Use --cleanup to also remove the cached package folder from disk when it is safe.

Terminal window
nubo del github.com/nubolang/color --cleanup

When deleting a package, Nubo:

  1. Parses the package URI.
  2. Finds the package in _nubo.yaml.
  3. Finds the lock entry in lock.yaml.
  4. Checks whether other packages still reference the same dependency.
  5. Checks nested dependency relationships.
  6. Removes project metadata.
  7. Removes lock data when safe.
  8. Optionally removes the cached folder if --cleanup is used.

Nubo avoids removing a package from the lockfile or cache if another locked package still depends on it.

If the package is still referenced, Nubo removes it only from direct project metadata.

That means _nubo.yaml can change while lock.yaml keeps the dependency because it is still needed transitively.

If the package has its own lock.yaml, Nubo checks nested dependencies.

When safe, it recursively deletes dependencies that are no longer needed.

The cached folder is only removed when --cleanup is passed.

Cache path example:

~/nubo/packages/github.com/nubolang/color@f5063d6fa53bf8be818f4316273ee81fb5474d21

Without --cleanup, the cache remains on disk.

Delete from project metadata:

Terminal window
nubo del github.com/nubolang/color

Delete and remove cache when safe:

Terminal window
nubo del github.com/nubolang/color --cleanup

Delete multiple packages through the CLI:

Terminal window
nubo del github.com/nubolang/color github.com/example/other