Skip to main content
On this page

deno uninstall [PACKAGES] Jump to heading

Remove dependencies specified in deno.json or package.json:

›_
deno add npm:express
Add npm:express@5.0.0

cat deno.json
{
  "imports": {
    "express": "npm:express@5.0.0"
  }
}
›_
deno uninstall express
Removed express

cat deno.json
{
  "imports": {}
}

Tip

You can also use deno remove which is an alias to deno uninstall [PACKAGES]

You can remove multiple dependencies at once:

›_
deno add npm:express jsr:@std/http
Added npm:express@5.0.0
Added jsr:@std/http@1.0.7

cat deno.json
{
  "imports": {
    "@std/http": "jsr:@std/http@^1.0.7",
    "express": "npm:express@^5.0.0",
  }
}
›_
deno remove express @std/http
Removed express
Removed @std/http

cat deno.json
{
  "imports": {}
}

Info

While dependencies are removed from the deno.json and package.json they still persist in the global cache for future use.

If your project contains package.json, deno uninstall can work with it too:

›_
cat package.json
{
  "dependencies": {
    "express": "^5.0.0"
  }
}

deno remove express
Removed express

cat package.json
{
  "dependencies": {}
}

deno uninstall --global [SCRIPT_NAME] Jump to heading

Uninstall serve

›_
deno uninstall --global serve

Uninstall serve from a specific installation root

›_
deno uninstall -g --root /usr/local/bin serve
Command line usage:
uninstall

Uninstalls a dependency or an executable script in the installation root's bin directory

Options Jump to heading

Load 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-lockfile
Jump to heading

Error out if lockfile is out of date.

--global, -g
Jump to heading

Remove globally installed packages or modules.

Load import map file from local file or remote URL.

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

--lockfile-only
Jump to heading

Install only updating the lockfile.

--min-dep-age
Jump to heading

(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).

Skip type-checking. If the value of "remote" is supplied, diagnostic errors from remote modules will be ignored.

--no-config
Jump to heading

Disable automatic loading of the configuration file.

Disable auto discovery of the lock file.

Do not resolve npm modules.

--no-remote
Jump to heading

Do not resolve remote modules.

--node-modules-dir
Jump to heading

Selects 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-linker
Jump to heading

Sets the linker mode for npm packages (isolated or hoisted).

--package-json
Jump to heading

Force using package.json for dependency management instead of deno.json.

--reload, -r
Jump to heading

Reload 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.

Installation root.

--unsafely-ignore-certificate-errors
Jump to heading

DANGER: Disables verification of TLS certificates.

Toggles local vendor folder usage for remote modules and a node_modules folder for npm packages.

Last updated on

Did you find what you needed?

Edit this page
Privacy policy