clear logs file of pm2 code example Example: pm2 clear logs pm2 flush pm2 flush # Clear the logs for the app with name/id matching