# NPM/Yarn Cache Keeps Growing

**URL:** <https://forum.ghost.org/t/npm-yarn-cache-keeps-growing/9915>\
**Category:** Developer help\
**Created:** [November 1, 2019, 4:28am UTC](https://forum.ghost.org/t/npm-yarn-cache-keeps-growing/9915 "2019-11-01T04:28:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![petemahon](https://avatars.discourse-cdn.com/v4/letter/p/df788c/32.png) [@petemahon](https://forum.ghost.org/u/petemahon)\
**Post date:** [November 1, 2019, 4:28am UTC](https://forum.ghost.org/t/npm-yarn-cache-keeps-growing/9915/1 "2019-11-01T04:28:38Z")

</div>

Hi,

I’ve had my ghost blog running for some time, rolling through a number of upgrades and one reinstallation over the past years.

Version: 3.0.2  
Default configuration - no code changes from base.  
Browser isn’t relevant for my problem.  
No errors.

I’m installed on Linux Mint and my issue is as follows:

The cache folder in my home directory contains a folder for Yarn. Directory structure looks like this (only showing one module “acorn” as example - there are thousands of others in the v4 folder):

```
/yarn
  /v4
    /npm-acorn-3.3.0-xxx
    /npm-acorn-5.7.3-xxx
    /npm-acorn-6.0.5-xxx
    /npm-acorn-5.7.3-xxx
    /npm-acorn-6.0.5-xxx
    /npm-acorn-6.1.0-xxx
    /npm-acorn-6.1.1-xxx
    /npm-acorn-6.2.1-xxx
    /npm-acorn-6.3.0-xxx
    /npm-acorn-7.0.0-xxx
    /npm-acorn-7.1.0-xxx
  /v6
    /npm-acorn-3.3.0-xxx
    /npm-acorn-5.7.3-xxx
    /npm-acorn-6.3.0-xxx
    /npm-acorn-7.1.0-xxx

```

The server it runs on is reporting this folder as one of the largest, clocking in at over 2.6GB. This is a rolling cache that never clears automatically.

**Ghost is the only application I have which uses NPM.**

Housekeeping for this is super easy - head over to [Installation | Yarn](https://yarnpkg.com/en/docs/install#debian-stable) and follow instructions to install Yarn, then run

```
yarn cache clean

```

OR, as I discovered after combing documentation

```
ghost buster

```

In a production environment dedicated to Ghost, this is something which I think could perhaps get called after a ghost update is installed, in much the same way as old versions of Ghost itself get automatically cleaned up.

Thoughts?

Kind Regards, Pete
