PM2 Flush not clearing logs

Viewed 557

I run a Ubuntu server which is suddenly full because of pm2 logs taking 16GB. I tried pm2 flush. But this only clears the folder which took 4GB.

enter image description here

As root the ".pm2" folder is cleared but not logs folder. As my own user the folder is cleared but under the wrong username.

Here is showed running pm2 flush in root and admin user.

enter image description here

How do i clear it?

1 Answers

you should try pm2 flush <app_name> it will remove the default output and error logs from .pm2/logs the above command does not flush the merge logs for the specified app_name

Related