Heroku Buildpack: Node Modules Cleanup Remove all node_modules directories and .yarn/cache files after the build process is completed. see also based on https://github.com/leoafarias/heroku-buildpack-node-modules-cleanup