It's undisputed that killing Fredo was absolutely unnecessary. He was weak, not respected and incapable of making a move / orchestrating grand plans. It shows in the final Godfather film that Michael deeply regretted killing Fredo, he should of disowned him but I can understand the heat of the moment / the lifestyle calls upon Fredo's death

As other people said Roth was a threat and very powerful. He needed to be killed

and Pentangeli? of course. He made the decision to rat so why take another chance? I'm surprised they didn't have anyone on the inside to get rid of him