Except for the part where in both instances there were living Jedi still in the galaxy following their deaths?
Such is the cycle of the Force. You can never truly destroy the Jedi anymore than you can truly destroy the Sith.
Destroy their power base and influence in the galaxy and reduce their numbers to 2 or 3? That you CAN do.
But because of sheer arrogance on both sides, they don't bother to completely wipe out the teachings and one always rises, sparking a new Jedi or new Sith Order.
Traya and Sidious are the 2 closest to ever utterly snuffing out the Jedi.
And on the Jedi side, that distinction falls to Revan and Luke Skywalker.
They will always come extremely close, but something will always stir. It is the will of the Force.