Tips to save some space on Peertube instance


Just a quick tip to save some space on your (long running) Peertube instance.
Everytime you update Peertube, or install a new plugin, yarn create a folder under /var/www/peertube/.cache/yarn/.
And this folder can use a lot of space!

For example I have a production instance, that has less that 2 years, using 1 plugin: the folder contain 3Go of data!

On another server, where i make some plugin dev tests: 48Go !!!

Deleting the /var/www/peertube/.cache/yarn folder is 100% safe. You can delete it after upgrading, or every 2 or 3 months. It can save a lot of space!

You can also exclude this folder from your backups.

PS: I still don’t understand why yarn does not clean itself such a folder… Maybe there is an argument that could be added in the upgrade script?

1 Like

Another folder where you can cleanup some files: /var/www/peertube/backup: each time you upgrade, there is a new dump of the database. You can delete old files.

1 Like

And of course, /var/www/peertube/versions: can contain old versions. You can keep only the current and the previous one.

1 Like

wow, on my main dev machine there was 180 gigs in that yarn cache, thanks for the heads up.

1 Like