Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to clear Nx cache

I have an Nx monorepo (https://nx.dev). It has a folder with Nx cache (./node_modules/.cache/nx/). Its size for now is over 3GB.

Is there a command for clear this cache?

like image 305
Pax Beach Avatar asked Jan 27 '21 09:01

Pax Beach


People also ask

How do I clear the cache on my NX?

Nx cache can be cleared by removing files in the directory node_modules/. cache/nx . Sometimes, you have to clear cache. For example, if you moved a component to another library, the component was still kept in the cache of the old library.

Where does NX store cache?

The cached value is stored by default in node_modules/. cache/nx .

What is NX cache?

Save Time with Distributed Task Execution & CacheNx caches the output of any previously run command such as testing and building, so it can replay the cached results instead of rerunning it. Nx Cloud allows you to share the computation cache across everyone in your team and CI.

What does NX Reset do?

Clears all the cached Nx artifacts and metadata about the workspace and shuts down the Nx Daemon.


1 Answers

Just delete the whole 'nx' cache folder:

rm -rf ./node_modules/.cache/nx
like image 148
daiscog Avatar answered Oct 13 '22 19:10

daiscog