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.
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>optionalError out if lockfile is out of date.
--lock<FILE>optionalCheck the specified lock file. (If value is not provided, defaults to "./deno.lock").
--no-lockDisable auto discovery of the lock file.
Options Jump to heading
--lockfile-onlyInstall only updating the lockfile.