npx

The `npx` command is a tool bundled with `npm` (since version 5.2.0) that allows you to run Node.js packages without needing to install them globally. It looks for the package in your project’s local `node_modules/.bin` folder first, and if it’s not found there, `npx` will temporarily download it and run it directly - docs.npmjs.com

This makes `npx` ideal for one-off commands or scripts, like running `npx create-react-app` or `npx eslint .`, without permanently adding those packages to your project dependencies.

# Where npx Stores Packages When `npx` downloads a package that isn’t already installed, it stores the files in your local npm cache. This cache is located inside your user directory and can be viewed or changed with the following command:

npm config get cache

Typical default locations are: - macOS / Linux: `~/.npm` - Windows: `%AppData%\npm-cache`

# Automatic Deletion Packages downloaded by `npx` are **not deleted automatically**. They stay in the npm cache, which allows future `npx` runs to reuse them instead of re-downloading. This improves performance and avoids repeated network requests.

However, you can manually clean the cache at any time:

npm cache clean --force

or inspect it:

npm cache verify

# Summary - `npx` runs npm packages without global installs - It caches temporary downloads inside the npm cache folder - Cached files persist until manually removed - The cache can be safely cleaned with `npm cache clean --force`