How to remove orphaned entities?

I recently renamed a device and the names of the associated entities were changed as well but some of the old entities were not removed.

They still show up in settings>entities with no info available and no unique ID. How can I remove them?