There have been a few near misses of large meteors passing the Earth recently. I wondered about the best way to avoid a collision should one be predicted.
It's a common misconception that nuclear weapons fired from the Earth could be used to destroy meteors. Nuclear weapons, though powerful on Earth, are powerful partly because they heat the air, dust, and other objects around their detonation. In the vacuum of space, their blast would radiate mere light and a few particles of their fissile material. Not enough to deflect or do much at all to meteor or comet which might be the size of a city. A detonation on the surface of a meteor or planet will generate some repulsive force due to the dust and other particles pushed away from the surface of the rock, but this wouldn't be a strong force, merely proportional to the speed and mass of the dust thrown up. Dreams of blasting or smashing a space rock to pieces are unrealistic. In the deadly radioactive void of space, our nuclear weapons are small-fry.
Two good options spring to mind. The first is time, that a slight deflection early on can change the course of a impactor such that it would miss the Earth. A small explosion might deflect the meteor, but ideally some sort of engine would be flown to it, which would attach to the surface of the rock and push it, or pull it like a tug-boat, to a new course. The engine would require fuel itself, but there are many forms of space propulsion. A huge solar-sail could be deployed, and lasers from the Earth used to push the meteor to a new course, or an ion engine powered by the sun or radioactive elements, if there were sufficient time.
Such an endeavour would probably take years to work however, as the forces involved with our engines might be tiny; especially in the case of ion engines or solar sails. Larger rocket engines would require huge amounts of fuel, and a vast amounts of energy to just launch and construct these.
Energy is the key factor. A city-sized meteor would have an enormous amount of energy, and counteracting this is not easy.
Perhaps the best option is to use a similar-but-opposite heavy object to deflect it. A vast spacecraft, something like a cube of iron a kilometre, or several kilometres, across would make a good "space fist" with which to strike a meteor. An array of such giant cubes, each with engines and fuel to direct them, could orbit the Earth to form a defence perimeter, ready to target a meteor if needed.
The cost and energy required to launch such an object would be huge, even if accumulated over a long time. A more efficient alternative is to use existing mass in the solar system, saving the vast energy cost of launching such heavy objects, as well as the planetary resources; that's a lot of iron to mine and throw away. Asteroids or other rocks from the solar system could be harvested.
A giant engine, with a sort of clamp, and fuel reserves, could be launched. These would seek out an asteroid or other space object of a good size, grab it a fly it back to Earth, pointing it outwards to orbit our planet as part of the defence shield. The engines that grip these huge rocks could be refuelled and serviced by Earth vessels. These rocks might be so large that bases with people, telescopes or radar stations themselves could be stationed on the surface. Very massive rocks could be selected, each a single shot to bash away any meteor that might be set on colliding with the Earth.
One warning though, as the film Starship Troopers shows, is that such rocks and such technology would create powerful weapons in themselves. If these defensive rocks were to be crashed into the Earth they would cause far more damage the to Earth than nuclear weapons, perhaps exterminating all life, as could any normal large meteor impact.
Perhaps this fact proves that the best defence from the natural doomsday phenomena of meteors is a similar device itself.