deno remove
deno remove removes dependencies from your project's configuration file. It is
the inverse of deno add.
Basic usage Jump to heading
Remove a package:
deno remove @std/path
Remove multiple packages at once:
deno remove @std/path @std/assert npm:express
Where dependencies are removed from Jump to heading
deno remove will look at both
deno.json and package.json (if
present) and remove the matching dependency from whichever file it is found in.
Removing a dependency does not delete it from the global cache. To reclaim disk
space, see deno clean.
Removing a global executable Jump to heading
Pass --global (or -g) to remove a globally installed executable script, the
same as deno uninstall --global:
deno remove --global serve
A global removal targets a single executable, so you cannot combine --global
with multiple names. Use --root to target a custom installation root.
removeRemove dependencies
Options Jump to heading
--certLoad certificate authority from PEM encoded file.
Configure different aspects of deno including TypeScript, linting, and code formatting.
Typically the configuration file will be called deno.json or deno.jsonc and
automatically detected; in that case this flag is not necessary.
--frozen-lockfileError out if lockfile is out of date.
--global, -gRemove globally installed package or module.
Load import map file from local file or remote URL.
--lockCheck the specified lock file. (If value is not provided, defaults to "./deno.lock").
--lockfile-onlyInstall only updating the lockfile.
--min-dep-age(Unstable) The age in minutes, ISO-8601 duration or RFC3339 absolute timestamp (e.g. '120' for two hours, 'P2D' for two days, '2025-09-16' for cutoff date, '2025-09-16T12:00:00+00:00' for cutoff time, '0' to disable).
--no-checkSkip type-checking. If the value of "remote" is supplied, diagnostic errors from remote modules will be ignored.
--no-configDisable automatic loading of the configuration file.
--no-lockDisable auto discovery of the lock file.
--no-npmDo not resolve npm modules.
--no-remoteDo not resolve remote modules.
--node-modules-dirSelects the node_modules directory mode for npm packages (not a path). One of: auto (create a local node_modules directory and install npm packages into it), manual (use the existing local node_modules directory, do not modify it), none (do not use a local node_modules directory; resolve npm packages from the global cache). Defaults to auto when the flag is passed without a value.
--node-modules-linkerSets the linker mode for npm packages (isolated or hoisted).
--package-jsonForce using package.json for dependency management instead of deno.json.
--reload, -rReload source code cache (recompile TypeScript). With no value, reloads everything. Pass a comma-separated list of specifiers to reload only those modules; npm: reloads all npm modules; npm:chalk reloads a single npm module; jsr:@std/http/file-server,jsr:@std/assert/assert-equals reloads specific modules.
--rootInstallation root.
--unsafely-ignore-certificate-errorsDANGER: Disables verification of TLS certificates.
--vendorToggles local vendor folder usage for remote modules and a node_modules folder for npm packages.
Last updated on