The short answer
Yes. Rebuilt or re-downloaded automatically when needed.
What is it?
When you run a command with npx (or npm exec) for a package that is not installed in the current project, npm installs it into a hashed subfolder of ~/.npm/_npx. Each one-off command leaves a small node_modules tree behind, and over time they add up.
Packages downloaded to run one-off npx commands. Downloaded again the next time they run.
What happens if you delete it?
The package is downloaded again the next time you run that npx command, which adds a short delay. Nothing else depends on these folders.
How to remove it properly
Make sure no npx command is running, then move ~/.npm/_npx to the Trash with Finder’s Go › Go to Folder….
Quit the app that uses it, then move it to the Trash. Empty the Trash when you’re sure.
How MoreRoom helps
MoreRoom recognises this item, shows its real size and when it was last used, and labels it “Safe to remove”. In the free version you can move it to the Trash in one click, with Undo; Pro collects every safe item at once.
Frequently asked questions
Is it safe to delete the ~/.npm/_npx folder?
Yes. Rebuilt or re-downloaded automatically when needed. The package is downloaded again the next time you run that npx command, which adds a short delay. Nothing else depends on these folders.
Will npx package cache come back after I delete it?
Yes. The package is downloaded again the next time you run that npx command, which adds a short delay. Nothing else depends on these folders.
How do I remove npx package cache properly?
Make sure no npx command is running, then move ~/.npm/_npx to the Trash with Finder’s Go › Go to Folder….