Skip to main content
On this page

deno unlink

The deno unlink command removes a local package link created with deno link, so imports resolve to the published registry version again. It edits the links array in the nearest deno.json for you.

You can remove an entry by its path or by the linked package's JSR name:

>_
# By the path you linked
deno unlink ../my-local-pkg

# By the package's JSR name
deno unlink @scope/name

Path arguments resolve relative to the current working directory, the same way deno link resolves them, so deno unlink ../pkg matches an entry created by deno link ../pkg from the same directory. When the links array becomes empty it is removed entirely.

If no argument matches a linked entry, deno unlink exits with a non-zero status rather than reporting success, so a mistyped path or name is detectable in scripts and CI. It never creates a deno.json: if there is none, there are no linked packages to remove.

Command line usage:
deno unlink [OPTIONS] [names_or_paths]...

Remove a linked local package from the current project.

deno unlink ../my-local-pkg
deno unlink @scope/name

Accepts either a path that matches an existing entry in the "links" array, or the JSR-style name of a linked package.

Dependency management options Jump to heading

--frozen<BOOLEAN>optional
Jump to heading

Error out if lockfile is out of date.

--lock<FILE>optional
Jump to heading

Check the specified lock file. (If value is not provided, defaults to "./deno.lock").

Disable auto discovery of the lock file.

Options Jump to heading

--lockfile-only
Jump to heading

Install only updating the lockfile.

Last updated on

Did you find what you needed?

Edit this page
Privacy policy