Let's do a quick estimate. Destroying a Mars-like planet requires expending the equivalent of its gravitational self-energy, ~GM^2/R, which is about 10^32J (which we could easily obtain from a comet 10 kn in radius... consisting of antimatter!) For comparison, the Earth's magnetic field has about 10^26J of energy, a million times less. I leave it to you to draw the conclusions.
This thread is for asking any questions that might seem obvious, tangential, silly or what-have-you. Don't be shy, everyone has holes in their knowledge, though the fewer and the smaller we can make them, the better.
Please be respectful of other people's admitting ignorance and don't mock them for it, as they're doing a noble thing.
To any future monthly posters of SQ threads, please remember to add the "stupid_questions" tag.