From version 13.0.0 there will be a .angular folder generated in root which is ignored by git containing a cache folder which caches builds.
How can I remove (or clear) this cache?
From version 13.0.0 there will be a .angular folder generated in root which is ignored by git containing a cache folder which caches builds.
How can I remove (or clear) this cache?
You can configure caching options of cli in angular.json file. One of options is cache which gives you the option of disabling it.
{
  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
  "version": 1,
  "cli": {
    "cache": {
      "enabled": false
    }
  },
  "projects": {}
}
You can disable it by running this command too:
ng config cli.cache.enabled false
rm -rf .angular/cache
rmdir /s /q .angular/cache
For Angular 14 and up, you can now clear, enable and disable cache config by running these commands:
ng cache clean
// Deletes persistent disk cache from disk.
ng cache disable
ng cache off
// Disables persistent disk cache for all projects in the workspace.
ng cache enable
ng cache on
You can find out more about it in docs.