I am trying to start a process with a specific name:
$ pm2 start app.js --name "api"
However, the process is still running as app:

Just delete it first
pm2 delete app
Updating application name via pm2 restart app --name "new-name" --update-env
Update available ([email protected] - latest stable):
$ npm install pm2@latest -g
$ pm2 update
Please re-open this issue if you notice any problem,
I still have this issue. I still not able to rename my process @Unitech
@indrasantosa Are you sure that you have updated the PM2 Daemon ? Do a pm2 update to be sure.
Hi @vmarchaud, Yes, I use pm2 2.1.5
same here doesn't work. on version 2 .1.6
same here doesn't work. on version 2.2.2
pm2 restart app --name "new-name" --update-env
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
Updating application name via
pm2 restart app --name "new-name" --update-env