Skip to main content
On this page

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.

Command line usage:
deno remove [OPTIONS] [packages]...

Remove dependencies from the configuration file.

deno remove @std/path

You can remove multiple dependencies at once:

deno remove @std/path @std/assert

With the --global flag, this is an alias for deno uninstall --global and removes a globally installed executable script:

deno remove --global file_server

Options Jump to heading

--global, -g
Jump to heading

Remove globally installed package or module.

--lockfile-only
Jump to heading

Install only updating the lockfile.

--package-json
Jump to heading

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

--root<root>
Jump to heading

Installation root.

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.

Last updated on

Did you find what you needed?

Edit this page
Privacy policy