Pi: There are so many possibilities... I'd have to requisition some ordnance, sir. Tagon: You are not allowed to nuke Northport "just to be sure." Pi: I'd have to nuke a lot more than just Northport to be really sure.
Blood+: The American government's primary method of dealing with chiropteran outbreaks is "Option D," in which the area in question is bombed until there's nothing left but a smoking crater.
In Neon Genesis Evangelion, the "nuke it to be sure" strategy is part of the standard response to an Angel attack. It never works. First the conventional forces attack, then they use something called an "N2 mine" which is described as the next step beyond thermonuclear explosives. When those fail, then they send out the Evas. This serves to send several frightening messages. First, that the Angels are so threatening that weapons beyond nuclear are a standard response; second, that they are so powerful that such weapons have no effect; and most subtle and chilling, that the Evas are so dangerous that the military is willing to try nukes before sending them out. This order of attack is the viewer's first clue just how scary Evas really are. It only gets worse from there.
In Marvel Zombies, a nuclear strike was considered to contain the superhero zombie infection. Then Quicksilver caught it, and "containment" was no longer an option.
In Jim Starlin's The Metamorphosis Odyssey (first appearance of Dreadstar ), the alien villains Zygoteans are bent on conquering the Milky Way; once they are done, they'll go to the next galaxy. Byronic Hero Aknaton understands he cannot save the Milky Way from this horrible fate. His plan is to obliterate the Milky Way before the Zygoteans are done with it, so he can at least save other galaxies. As Akenaton is very long-lived, he thinks in a very long term.
During Secret Wars II, Phoenix (Rachel Summers) from X-Men considered destroying the whole universe in an attempt to stop the Beyonder: He was too powerful to be affected by any "common" attack, but Ray theorized he may (only may) be unable to survive if the universe around him ceased existing. At that point in the plot the Beyonder, while clearly a Person of Mass Destruction , was only arguably a villain - Who's the Omnicidal Maniac now, Ray?
She decided to do this after the Beyonder had seemingly caused the New Mutants to be erased from existence, with only Kitty Pryde (due to her magical connection to one of their members) even remembering that they ever existed. But Rachel had also become somewhat obsessed with eliminating the Beyonder, and he went out of his way to provoke her to keep trying. When she backs down without destroying the universe, he says that he would've survived it anyway. And expresses disappointment that she didn't go through with it.
In Aliens, the Trope Namer, this method is suggested for dealing with the alien infestation of Acheron, but is never executed for reasons beyond the Marines' control. The first climax of the film renders the point somewhat moot.
This was also intended in the first film. The Nostromo was self destructed by the crew in an attempt to ensure the alien would be destroyed along with it. Things didn't turn out that way.
In Alien vs. Predator, one Predator detonates an explosive device in the alien hive, destroying the entire pyramid.
In Alien vs. Predator: Requiem, the U.S. Army drops a nuclear bomb on the town of Gunnison, CO, to contain an infestation of Xenomorphs.
In The Crazies 2010 remake, the U.S. Army incinerates a small Iowa town to contain a leaked biological weapon.
In the original 1973 version of The Crazies, a nuclear strike was discussed, but not used.
In 28 Weeks Later, the Rage virus escapes containment. The US Army panics and napalms most of the Isle of Dogs. It doesn't help.
In Return of the Living Dead, the Army nukes Louisville, KY, to destroy a horde of zombies created by the chemical agent 2,4,5-Trioxin. This actually spreads the gas further.
In Outbreak, a fuel-air bomb was used in the beginning to purge an isolated outbreak of the Motaba virus. Later, an American town was saved from a similar fate when a cure was devised from the original host.
The option was suggested in Dawn of the Dead (1978) by the eyepatch-wearing Dr. Rausch in a television interview. He was not taken seriously.
In The Andromeda Strain, this trope was averted when the protagonists realized a nuke would actually spread the contagion much, much further.
The goofball Thai film SARS Wars: Bangkok Zombie Crisis shows the Thai government destroying an apartment complex to halt the spread of a strain of SARS virus which turns people into zombies.
In The Avengers, the World Security Council decides to simply nuke Manhattan to contain the invading Chitauri forces, despite the fact that the Avengers are still continuing their efforts to stop the Chitauri and that there's still civilians evacuating the area. SHIELD Director Nick Fury declares the idea a "stupid-ass" strategy for dealing with the invasion, and takes down the nuke carrying plane with a rocket launcher. It's a pity that someone on the WSC was Genre Savvy enough to launch a second plane.
In Pontypool, the Canadian government eventually bombs the hell out of the titular city.
It is first described that the Soviets carpet-bombed a biological research facility and the neighboring village to stop an outbreak of a genetically modified organism in the 80s.
Later, the underground laboratory at the Mount Dragon complex itself is pumped full of superheated air from the sterilizing units on the surface, turning the whole facility into a canned inferno.
Averted in World War Z: nuclear weapons are never used against zombies; however, Pakistan and Iran engage in a brief nuclear war against one another, and the Chinese politburo are annihilated by a nuke from a rogue Chinese submarine.
In a non-nuclear example, the city of Yonkers is flattened by thermobaric weapons when a poorly-planned infantry engagement goes awry. They do take out tens of thousands of zombies, but that's not much when there's a million more behind them, and their affects on respiratory systems are nullified, greatly reducing their effective radius.
In Animorphs, the Andalite military attempts to do this to the entire Earth. Ax manages to force them to stop, though.
It's worse than that. Their plan isn't just to sterilize Earth to kill the Yeerks on it - their plan is to sabotage Earth's (thus far fairly damaging) resistance, lure more Yeerks in to infest the populace, and then sterilize it. It all comes crashing down when Ax contacts the Andalite military command and civilian media simultaneously, without telling either party, and gets the military to discuss the plan.
In Patient Zero by Jonathan Maberry, a secret bunker uses its geothermal power supply as an emergency self-destruct mechanism.
In the Jonathan Maberry novel The King of Plagues, terrorists plotted to release a genetically engineered, airborne strain of Ebola from the Scotland-based laboratory which developed it. The nuclear option would have been employed had the protagonist failed to save the day.
In a different Jonathan Maberry novel, the government intends to firebomb the town of Stebbins, Pennsylvania, to contain (and cover up) a zombie outbreak. they change their minds when footage of the outbreak ends up on YouTube.
A small-scale example in Wraith Squadron: on Storinal, the Wraiths break into a disease-control center that houses small samples of various contagions for lab use. Their security includes a plasma bomb array, capable of leveling several city blocks, in case of leaks. Fortunately, Kell Tainer is able to defuse it (then hooks it back up before they leave, so that no one realizes they were there).
In Night of the Living Trekkies, the government decides on nuking the greater Houston metropolitan area as the best option for taking out the zombie plague that's broken out all over the city.
Non-plague example: In John Christopher's The Death of Grass (US title: No Blade of Grass) the British government decides to nuke cities to minimize the number of starving refugees that would otherwise roam across the countryside.
Live Action TV
An episode of The Champions involved an island where evil scientists were making a lethal gas for chemical warfare or terrorist attacks. At the end of the episode, the Army has a nuke dropped on it.
The Doctor Who episode Nightmare in Silver had a scene when it's mentioned that previously the Cybermen were only defeated by blowing up an entire galaxy resulting the death of trillions.
Occurs with depressing regularity in Warhammer 40,000, usually from the Imperial method of Exterminatus, either by Virus Bomb or Cyclonic Torpedo or good ol' fashioned "shoot the planet until it breaks apart" trick. Ironically, it's also always justified. (Would you rather a quick, relatively painless death or millenia of torment as your soul is flayed from you along with your skin inch by inch?)
For instance, one of the major reasons for Exterminatus is the fear of a planet imminently becoming a Daemon World (it can't be used on one that's already a Daemon World since they don't completely exist in normal reality any more). Or the discovery of a Necron presence on the world - although unless the Imperials are very lucky, they probably won't discover the tomb until the Necrons awaken and kill everything. Or perhaps its invasion by Tyranids, Orks, or Chaos cultists - there are many worse things in 40k than a quick death by lance cannon.
Almost always justified. 40k being the setting it is, there have been occasions where Exterminatus orders have been issued (and carried out) for reasons as petty as a communications specialist not being allowed to retire and return home. Poor, poor Stalinvast...
And of course, as per usual with 40K, sometimes The Only Way To Be Sureisn't 100% sure. The Imperium has stopped using Virus Bombs once they discovered that making an entire planet's population with viruses was strengthening Nurgle, the Chaos god of disease. As Ciaphas Cain (HERO OF THE IMPERIUM!) once put it, sometimes Exterminatus just gives them ideas.
A common policy among the more hardline Firewall members in Eclipse Phase is "sometimes, blasting the habitat into radioactive dust is the only way to...well, you know". Sometimes it works wonders; when applied by Earth's power blocs against the TITANs, during the Fall, it was about as effective as a rubber hammer.
The Movie spin-off Resident Evil: Degeneration actually averts this scenario with the main outbreak at an airport, but the WilPharma pharmaceutical laboratory is destroyed in a spectacularly elaborate self-destruct sequence.
In Prototype, Manhattan is set to be destroyed by a nuclear bomb after the Blacklight and Redlight viruses have run amok. The player character Alex Mercer averts this by personally flying the bomb away from Manhattan, dumping it into the river and sacrificing himself in the process. He gets better. So does New York, despite seemingly the entire city being infected by the end of the game.
In Prototype 2, the government tries again, using thermobaric rockets fired from helicopters. They fail again.
Metroid: Fusion double subverts this. When the BSL Station is overrun by the X Parasite, Samus plans to activate the station's self-destruct to kill all of them aboard. However, her AI informs her that this doesn't guarantee she'll kill all the X Parasites, just the ones aboard the station, so it recommends causing the station to fall out of orbit so that its self-destruct field also destroys the planet, ensuring all the X die.
The Covenant in Halo doesn't stop at nukes when it comes to Flood outbreaks. They bombard the entire planet with plasma until rock and sand starts to melt and is transformed to volcanic glass. Earth gets spared this treatment due to the Arbiter advising Half-Jaw against it, though half of Africa is still glassed.
The Halos themselves are the Forerunners' execution of this trope, killing all non-Flood life in the galaxy to ensure the Flood has no food.
The plot of Final Fantasy XIII starts with an ancient being awakening in a tomb that was assumed to be empty, and immediately starting to force locals into its service. To contain the curse, the entire population is to be deported to the main planet their world is orbiting and which is the home of the ancient beings, but it soon becomes obvious that the people in charge don't really intend to let anyone remain alive.
In Half-Life: Opposing Force Black Ops assassins trying to blow up alien-infested facility and cover up the whole Black Mesa incident use a fusion warhead they removed from a nearby missile. Shephard kills them and deactivates the device, but later the G-Man sets up its timer again.
The G-Man: The biggest embarrassment has been Black Mesa facility, but I think that's finally taken care of itself... quite so.
In Dead Rising 2, the military plans to destroy Fortune City by firebombing when a team sent in to rescue the survivors is wiped out. It's never shown in the best ending.
Inverted in Dead Rising. Carlito (the villain) wants to blow up the mall to spread the virus rather than contain it, and you have to stop him.
In Dawn of War II: Retribution, the Inquisition executes the Exterminatus (explained in Tabletop section) to prevent a planet from being seized by an emerging Demon Prince. They are a bit too late and not so thorough.
In Starcraft, right before the first game, the Protoss incinerate a planet because it was overrun by the Zerg. The same thing happens another few times (off-screen) during the Terran campaign. The Protoss executor Tassadar abandons this tactic though, because he feels bad for all of the Terrans that die in the process.
In SC2 Wings of Liberty, Selendis wants to do this to an infested colony, albeit less drastically than the ones in the original. Instead of incinerating the entire planet, her method is vaporising the (potentially) infested parts.
Mass Effect 1: The research facility on Noveria includes a safety mechanism in the so-called "hot labs" that initiates a neutron bomb explosion and sterilizes the labs, to contain outbreaks. There's also a more comprehensive system that shuts down environmental control throughout the facility and sinks it deeper into the ice shelf, letting the conditions kill off anything hazardous. Similarly, this approach is also taken with Saren's facility in Virmire with the Salarians converting their ship's drive core to a makeshift nuclear device.
In the sequel Mass Effect 2, everyone except the Illusive Man thinks blowing the Collector Base is the only practical solution to prevent the mind controlling effects of Reaper technology from creating new minions that serve them. Which turned out to be futile, since the Illusive Man already had implanted himself with reaper technology years before, but at least it significantly slowed him down.
In the backstory of Nier, the White Chlorination Syndrome epidemic (a disease caused by the magic from the Drakengard world, specifically the Eldritch Abomination, entering the modern world in Ending E of the first game) is slowly spreading across Japan. A huge wall —the wall of Jericho— is erected to contain the disease and the infected. When it starts creating horrible monsters called Legion, the US military drops a nuclear bomb on it... spreading the infectionworldwide.
The one that started it all: in Shin Megami Tensei I, the combination of a military coup and the appearance of wild demons in Tokyo (and the former weaponizing the latter) leads to the United States bombarding the city with nuclear weapons. It is revealed, however, that it was actually a plot by the Law-aligned Ambassador Thorman and the Council of Angels to wipe the slate clean in order to start building the Thousand-Year Kingdom of God, using the demon invasion as the perfect window of opportunity.
In Shin Megami Tensei: Strange Journey, when it seems the reconnaissance teams sent to explore the Schwarzwelt have vanished and failed, the assembled world governments acting under the Schwarzwelt Investigation Project actually DO this, by bombing the Hell Gate with nuclear weapons... and it fails. Nothing can stop the Schwarzwelt from expanding. However, the teams trapped inside it devise a plan to use their own nuclear weapons (strapped to Cosmic Keystones of world-creating or world-ending power) to nuke the portal from the inside.
Threatened in Metal Gear Solid and Metal Gear Solid 3—but it's less a tactic to neutralize a threat and more to dispose of pesky witnesses and incriminating evidence (though there is some of the former, too).
F.E.A.R. has this happen at the end of the first game, in a desperate attempt to kill the now-freed Alma. To everyone's horror, it completely fails to affect her.
Dead Island averts this trope. Ryder White intends to call in a nuclear strike on the island of Banoi to burn out the infection. White fails to carry out his plan due to mutation and death.
In Bungie's Myth series, the forces of light tend to do this whenever they're able to defeat the current incarnation of The Leveller. Things done to its host include: Beheading him and throwing the head into a bottomless pit; Beheading and cremation; Having him drawn and quartered with the various parts scattered across the continent; Burning the body, mixing the ashes with salt, and then burying it all underneath a mountain.
In The Colony, this is your goal after rescuing the survivors of a transdimensional alien invasion.
In Schlock Mercenary, Tagon quickly remembers that encouraging his Mad Bomber's eager paranoia is a bad idea when he asks for ways to defend Northport.
Pi: There are so many possibilities... I'd have to requisition some ordnance, sir.
Tagon: You are not allowed to nuke Northport "Just to be sure."
Pi: I'd have to nuke a lot more than just Northport to be really sure.
The short-lived live-action web series Dead Patrol involved military teams tasked with delivering nuclear warheads to zombie-infested cities - by truck, for some reason.
The Alomal-137 Case Study by Lon Miller briefly describes nuclear annihilation of several east-coast cities in response to a pandemic.
The game Zombie 3 requires the player to bomb entire city blocks to stop a spreading zombie infestation. Depending on the player's skill, it may be easier to protect a small enclave of survivors and carpet-bomb the rest of the city as a precaution.
Several sites run by the SCP Foundation that house their more dangerous anomalies feature a tactical nuclear warhead or three as part of their structures. This is in case of a break-out, since "these things NOT running amok" is of a higher priority than "Contain, not destroy." In several instances, it's explicitly stated that the nukes wouldn't even destroy the objects, just slow them down enough that re-containment would be possible. Maybe.
In ReBoot the Guardian Collective takes this approach to dealing with web creatures. They don't even try conventional methods to get rid of them, opting to destroy the system as soon as one is found. Bob knows about this and is pissed when he sees Mouse tell the guardians about the web creature in Mainframe. Bob manages to stop this, but makes the situation worse.
In Clerks: The Animated Series, Leonardo Leonardo plans to takeover the town. Dante and Randal find a book detailing his master plan, which is full of counter-measures for every possibility. If things spiral completely out of control, the city is to be nuked from orbit. Randal even invokes the trope name.