deno

How do I completely uninstall Deno and its cached packages


I want to uninstall Deno and all of its cached packages. Where it caches its packages? And how to make sure that all of cached packages are uninstalled before installing a new version of Deno.


Solution

  • So here are deno cache locations on your system if you are used default install location:

    By default, DENO_DIR is located in $HOME/.deno. However, the user could also change its location by modifying the $DENO_DIR environment variable. Explicitly setting DENO_DIR is recommended in production.

    Also, this is hiararchy structure:

     DIRECTORIES
    gen/: Cache for files compiled to JavaScript
    deps/: Cache for remote url imported files
      |__ http/: For http imports
      |__ https/: For https imports
    
    # FILES
    deno_history.txt: History of Deno REPL
    

    So, in general I think that you can clear your deno installation with simple deleting folder $HOME/.deno on your computer. Also, you could try simple uninstall command which depends on your system and install tool you use here are info about installing deno with different tools so try use your tool and correct uninstall command https://github.com/denoland/deno_install