How to remove orphaned Log Reader Agents from Replication Monitor? How do I remove the two Log Reader Agents with errors from the Replication Monitor?

As you can see, the job does not exist (Error message produced by right click > Properties on errored Log Agent Reader) - it has previously been deleted, but these two Log Reader Agents refuse to go!
Its never recommended to delete rows from system defined table. Please follow below steps to remove any orphan logreader agent.


Create a  dummy transactional replication ‘Dummy1’.
Add database(select publisher_db from [distribution].[dbo].[MSlogreader_agents]) as publisher and another database(it would be good if you remember the old subscriber) as subscriber.
Add any dummy article to it.
Drop the subscriber of ‘Dummy1’.


This will renmove the orphan log reader agent of transactional replication. Similarly you can work for snapshot agent or merge agent.