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.
Removing a link Jump to heading
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.
unlinkRemove a linked local package from the current project
Options Jump to heading
--frozen-lockfileError out if lockfile is out of date.
--lockCheck the specified lock file. (If value is not provided, defaults to "./deno.lock").
--lockfile-onlyInstall only updating the lockfile.
--no-lockDisable auto discovery of the lock file.
Last updated on