To remove a "ghost" node, you first need the hub to see it as non-responsive. This should happen on its own over time (missing enough of the agreed-to wakeup intervals), but you can speed up that process by hitting Refresh for that node in your Z-Wave Details table, then waiting a few seconds. If that doesn't help, try it again. You should then get a Remove button, which you can use to remove the offending node.
Most (all?) access control devices, including door locks, will not pair without security. While some people recommend avoiding Z-Wave security (S0 and S2) whenever you can, this type of device is an exception.
If you remove your batteries from your door lock and hit refresh again a few times on the two ghosts you should get the Remove button and be able to remove the ghosts. Then put the batteries back into the lock.
With your batteries in the lock the hub is still able to ping the lock so it thinks it's still there.
Can anyone in the know confirm my suspicion that this goes by node ID and, thus, if the device is included (with a newer node ID), this shouldn't matter? It can't hurt, but shouldn't be necessary. Or so I've always assumed and hence didn't mention.
You could try waiting a bit longer, and Remove might appear on its own. (But if you haven't tried Refresh and waiting a few seconds or more, then trying again if needed, I'd do that first.) I believe this is supposed to happen on its own after the device misses a certain number (maybe two?) of wake-up intervals if it's a battery device. The default with most Hubitat drivers sets this to something like 12 hours (or is it 24...), so it might take a day or two. But Refreshshould work too, so it's mysterious if it doesn't.
You could try powering down the Z-Wave radio. Go to Settings > Shutdown to shut down the hub. Then, after the LED on the hub turns red (to indicate a complete shutdown), completely remove power for at least 30 seconds or so. Finally, re-connect power to let the hub reboot. (That middle step, removing power, is crucial to restart the Z-Wave radio, which is unaffected by a regular reboot or shutdown.) Then, try the refresh/remove thing above again.
If that still doesn't help, @danabw has a good write-up on how to use a secondary controller to remove "ghost nodes." That's rarely necessary nowadays (the above should work), but if you have a secondary controller, it's certainly an option...
hum. those ghost devices are there for at least 4 days now. (the schlage door lock and a dimmer)
I also shutdown the hub and moved it somewhere else which was easily over 30 seconds to be unpluged. I hit refresh a few times after that. still no remove button.
May take multiple tries on the Remove...agree that it's frustrating. The Z-Wave SDK is not under Hubitat control, and they can only expose capabilities provided by the SDK, and can't "make things work" perfectly. Make sure the dimmer is powered down, pull the air gap if it has one while you're trying Remove.
hum, ok. im remote, ill have to go there and pull the airgap.
what if I just remove that dimmer from any scene. will I still have issues?
between you and me, I dont really care it's there, as long as things work
No, first because there is no actual Hubitat device to disable (instead there is a "Discover" button that would create one, not that it would be useful if the corresponding node is no longer on the network) and because the disable feature just stops Hubitat driver code from running (it originated as a troubleshooting feature, say if you had a hub slowdown and suspected a bad custom driver) but has no effect on the underlying network/protocol.