Not always good.

and similar are used by a running process and you must not temper them with

What you need to do is:

  1. Make sure no process is listening to the corresponding port with
    ss -tlnp | grep 27017
  2. Then if no process is listening you may safely remove with
    sudo /bin/rm -f /tmp/mongodb-27017.sock