How do I delete/flush pm2 logs for only one app?

pm2
Ali Elkhateeb picture Ali Elkhateeb · Dec 14, 2018 · Viewed 16.3k times · Source

Can I flush the logs of only one app in Pm2?

Assuming my app id is 2

I tried

pm2 flush 2

but still it flushes all apps' logs.

Answer

Ali Elkhateeb picture Ali Elkhateeb · Dec 20, 2018

It was a bug in pm2.

I submitted an issue and they fixed it.

To solve it on your side, run these commands:

$ npm install pm2@latest -g
$ pm2 update

And it should work with the latest release.