Navigate back to the homepage

How to clear pm2 logs?

Infinitbility
pm2
October 20th, 2022 · 1 min read

Hi Friends 👋,

Welcome To Infinitbility! ❤️

Clear pm2 logs

To clear whole pm2 logs run pm2 flush, it will clean all application logs.

1pm2 flush

Clear pm2 logs for specfic application

To clear logs for specific applications use pm2 flush APP_NAME or pm2 flush APP_ID it will clean logs only for mentioned app name or id.

1pm2 flush APP_ID
1pm2 flush APP_NAME

Check the pm2 app id and app name

To check pm2 app_id and app_name use pm2 status it will show the list of application ids, names, and their status.

1pm2 status

Getting issues while cleaning logs for specific application

Install the latest version of PM2

1npm install [email protected] -g
1pm2 update

The above commands will install the latest version of pm2.

I hope it helps you, All the best 👍.

Follow me on Twitter

Join our email list and get notified about new content

No worries, I respect your privacy and I will never abuse your email.

Every week, on Tuesday, you will receive a list of free tutorials I made during the week (I write one every day) and news on other training products I create.

Looking For React Native Tutorial?

we are trying to create the best Tutorial for react native developers.

When you want a daily updates about React Native Tutorial or infinitbility update subscribe to our newsletter.

Read React Native Tutorial

Request New Tutorial or Article on mail [email protected]

Guide book

Guidebook: The Javascript Monorepo Photoshop Guide

Tutorials

Categories

More articles from Infinitbility

How do you add a character to the beginning of a string Javascript?

An example of add a character to the beginning of a string in javascript with the step-by-step guide.

October 19th, 2022 · 1 min read

How to look for a character in a string Javascript?

An example of search character in a string in javascript with the step-by-step guide.

October 19th, 2022 · 1 min read
© 2020–2022 Infinitbility
About
Link to $https://medium.com/infinitbilityLink to $https://www.facebook.com/InfinitbilityLink to $https://github.com/infinitbilityLink to $https://twitter.com/infinitbilityLink to $https://www.buymeacoffee.com/infinitbilityLink to $mailto:[email protected]