Skip to main content
The deno uninstall command removes globally installed executable scripts or removes dependencies from a project.

Usage

# Uninstall a global executable
deno uninstall [NAME]
deno uninstall -g [NAME]

# Remove project dependencies
deno uninstall [PACKAGES]...

Global Uninstallation

Remove globally installed executable scripts.
deno uninstall [NAME]
deno uninstall -g [NAME]

Flags

-g, --global
boolean
Uninstall a global executable script
--root
string
Installation root directory (defaults to $HOME/.deno)

Local Uninstallation

Remove dependencies from deno.json or package.json.
deno uninstall [PACKAGES]...

Flags

--lockfile-only
boolean
Only update the lockfile without removing cached packages

Examples

Uninstall global executables

Uninstall by name

deno uninstall file-server

Uninstall with explicit global flag

deno uninstall -g serve

Uninstall from custom root

deno uninstall --root /usr/local my-tool

Remove project dependencies

Remove a single dependency

deno uninstall @std/path

Remove multiple dependencies

deno uninstall @std/path @std/assert

Remove npm packages

deno uninstall chalk express

Update lockfile only

Remove from config but don’t delete cached files:
deno uninstall --lockfile-only @std/testing

What Gets Removed

When uninstalling a global executable, the following files are removed:
  • The executable script (.cmd on Windows)
  • Associated configuration directory (.{name}/)
  • Any lockfiles or config files for the installation
When removing project dependencies:
  • Package is removed from deno.json imports or package.json dependencies
  • Lockfile is updated
  • Cached files remain in the cache directory

See Also

Build docs developers (and LLMs) love