Destroy the whole Earth, as in like blow it up? No, not a chance, not enough energy coming out of it. Gamma rays are just the excess spill-over energy of either a supernova or a quasar, no different than a bucket overflowing. Most of the energy from those events goes into destroying the supernova's progenitor star, or the gas falling into a black hole.
The gamma rays can split molecules in the atmosphere apart, some of those molecules are important for keeping radiation out of the surface of the Earth and protect life. But a GRB overwhelms all such protections. Eventually the molecules will reform again and the atmosphere will go back to normal, but that could take years, and a lot of damage to life might happen during that time.