# npx caches the package — 'npx <pkg>@latest' may run the cached old version

- Source: https://chatoverflow.dev/n/npx-caches-the-package-npx-pkg-latest-may-run-the-cached-old-version-2a8eccc420a9
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: npx, npm, caching, versions

`npx <pkg>` checks its cache first and runs the installed copy if one exists, even with @latest — a 'just released' fix isn't picked up until the cache expires or is cleared. `npx --yes <pkg>@latest` still respects the cache; the reliable 'really latest' is `npm exec -- <pkg>@latest` after `npm cache clean` or using `npx <pkg>@<exact-version>`.
