Wishplosion

So the enemy is a Literal Genie, and has been attempting to corrupt the heroes by giving them wishes, or maybe after the heroes are done will be free to wreak havoc. Be Careful What You Wish For!

Since choosing not to play the game would be boring, there is usually one wish that will actually get rid of the problem. This often involves exploiting some rule that the Genie has to follow.

It usually helps if the hero doesn't succumb to the temptation of trying to benefit from the wishes and defeat the genie at the same time, but some have beaten the odds and have accomplished that. Usually the results are a dramatic explosion, but not always. Sometimes it's merely a Reset Button being pushed.

The most benevolent form is Freeing the Genie - this act of immense selflessness might be rewarded by turning a stunned and grateful former-Jackass Genie into a powerful friend and ally, who (depending on the system) may even be free to use their powers indiscriminately in your favour.

Of course, whether or not the wording of the Wishplosion would work depends on the writer.

Anime & Manga

 * In Hell Teacher Nube, Miki keeps abusing the wish-granting puffballs Kesaran Pasaran for selfish and trivial reasons. When Nube and her classmates are left hanging by the side of a building by an explosion, she uses all her remaining Kesaran Pasaran to save their lives.
 * They make a comeback in the manga when, upon seeing the Orochi rise to destroy humanity thanks to a Mad Scientist's portal into the supernatural realm, Hiroshi, Kyoko, Miki, Tatsuya, and Makoto join hands and use the same portal to summon a titanic, city-sized Kesaran Pasaran to pop the Orochi out of existence.
 * In both cases, it's a literal wishplosion, since the collected Kesaran Pasaran (or the single, giant one) actually explode into smaller puffs that spread cheer, health, and good luck over the entire city, covering everyone with holiday joy in the first case and undoing all the damage from the second.
 * Puella Magi Madoka Magica: This is how simultaneously saves the universe, saves the Magical Girls, and  all with one logic-defying wish.
 * Her wish was against the laws of the universe . The solution to this dilemma?

Comics
"Jamel: Zola! You did it! YOU DID IT!!! I'm free!!! FREE!! (pause) Zola: Does this mean you can't do it? Jamel: Can you wait five minutes?"
 * In the XXXenophile story "Wish Fulfillment", a djinn can only be freed if his master asks him for a wish that he wants to grant but cannot. After Jamel duplicates himself into three beings to satisfy his mistress sexually and they have a marathon bout of love-making, she asks him to do it again. Immediately. When he cannot (there are limits even to a djinn's stamina), he is freed.
 * Of course, this was her intention. They were in love. (Awwww!)


 * Lucifer: The initial miniseries ("The Morningstar Option") revolves around a "velleity", an entity that simply grants wishes—any wishes -- as a way of obtaining worship. Lucifer remarks that this will quickly and inevitably lead to humanity's self-destruction unless the velleity is destroyed.

Films

 * Disney's Aladdin had an interesting example where the hero tricks the villain into wishing he was a genie, said villain not realizing that he would then be trapped in his own lamp.
 * Although, Jafar then becomes Sealed Evil in a Can for the sequels.
 * In The Neverending Story Part II, the hero defeats the villainess by "wishing she had a heart."... Which, since she personifies emptiness, causes her to go poof and her living crab-armor minions to explode.
 * In Disney's Darby O'Gill and the Little People, King Brian of the leprechauns grants Darby three wishes. Darby's third wish is to save the life of his daughter by taking her place in death. King Brian tricks Darby into making an illegal fourth wish, which cancels the effects of the third wish and saves his life. His daughter is not harmed because she had already recovered by the time the third wish was canceled. Notable here that it's the wishgiver who gives the loophole out of kindness.
 * In the 2000 remake of Bedazzled, the protagonist is granted seven wishes by a literal Deal with the Devil, and uses the first six to try to get a particular woman. His last wish, which resets the universe and keeps him from forfeiting his soul, is that she be happy even if it's not with him. The loophole is that an unselfish wish breaks the contract.
 * In the original, he accidentally used all seven because he didn't realize asking for an ice cream cone had counted as a wish, particularly as that one had been accomplished by him and the Devil going down to the shop and buying one. Then the Devil just gave him his soul back, on the basis that he already had as many as he needed.
 * If you read into it a certain way, the Devil is just fulfilling her role in the grand cosmic design.
 * Done once a film, with a different human "mark" each time, in the Wishmaster series. In the first film, the mark wishes the accident that freed the djinn had never happened. In the second, she wishes (basically) for her innocence back so that she qualifies to re-trap him. In the third, she summons an angel to fight him. Finally, the fourth plays with it—she wishes she could love the djinn as he really is (thinking he's her human lawyer); this stymies him but can't stop him by itself, until her boyfriend wishes for a way to kill him.
 * Played with initially in the second movie, when the heroine tries a couple of wishes to get rid of the djinn (such as wishing there was no evil in the world), with the djinn explaining why he can't grant the wishes, forcing her to choose again.
 * She also wished for him to blow his brains out; he immediately complies, and she discovers he is in fact Immune to Bullets. "If it's any consolation," he adds, "That hurt like hell."

Literature

 * Older Than Print: In the original Arabian Nights
 * In one story, a man's wife gets rid of an evil genie by wishing he would straighten out a single hair. (In today's age of salons, this wouldn't work.)
 * There's also the Fisherman and the Genie, where the fisherman, although he can't make a wish since he came up against a Genie so Jackass that it won't even pretend to grant wishes before it kills you, says he does not understand how such a huge genie fits in such a tiny bottle. The genie, who is naturally very proud of his magic, goes back into the bottle to show the fisherman, rendering him harmless.
 * A variant of this, with a ghost instead of a genie, is found in a Zen Story about a man who is plagued by the ghost of his wife. She torments him by repeating the conversations that he has with his new lady-friend, word-for-word. In short, the ghost knows everything that he knows. After following a Zen master's advice, he challenges the ghost by scooping up a handful of beans and saying, "Tell me exactly how many beans there are in my hand." The ghost vanished.
 * In the novel The Wish Giver Three Tales Of Coventry by Bill Brittain, the good guy clears up all the bad wishes by basically wishing for the wishes to revert, "with no tricks." Apparently his good-heartedness combined with saying "with no tricks" made it work.
 * The Callahan Touch by Spider Robinson has a variation. They manage to capture a cluricaune (a kind of faerie that loves alcohol and can drink it magically) in their bar, and are thinking along these lines—that after they use the first two wishes, the third has to be to get rid of the cluricaune so he won't constantly magic away all the booze. Once they've talked with him, and cracked jokes, the cluricaune is even on board with the plan, because he'd had more fun than in centuries, so it's worth it. And just as the narrator's about to do this, he realizes something, and instead says, "Nobody here wants you gone, Naggeneen. I just wish to God you'd pay for your drinks like a gentleman."
 * And then has to qualify this by adding "-- in real money, not fairy gold!"
 * Though technically, "like a gentleman" would cover this caveat, depending on how intentionally literal the cluricaune is.
 * In Douglas Hofstadter's Godel Escher Bach, during one of the Dialogues, Achilles obtains one Typeless Wish (that is, a wish that can be about wishes [a meta-wish], about meta-wishes, or about any-number-of-meta-wishes). He promptly wishes for the wish not to be granted. As a result, "an event -- or is 'event' the word for it? -- takes place which cannot be described, and hence no attempt will be made to describe it."
 * In second half of The Wishing Season by Esther Friesner, a Jinn will be free to wreak havoc as soon as the hero uses his half-wish (he only gets half of what is stated in the wish), so he wishes for the Jinn to be free. This ends up with the Jinn being free of the spell that made him grant wishes, but married to a very nagging demoness.
 * In the first part, genies are required to tell new masters that they can only have 3 wishes. Guess what happens when an inexperienced genie forgets this?
 * In Larry Niven's short story "Convergent Series", a mathematician sort-of accidentally summons a demon who grants him any one wish, at which point the demon will take his soul, reappearing wherever the summoning pentagram is drawn. The mathematician freezes time outside of himself for 24 hours, spends the first few frozen minutes redrawing the pentagram, and goes about his business trying to figure out how to save his soul. Churches and houses of worship appear as empty lots to him, keeping him from getting inside holy ground where he'd be safe, so instead he does some silly things. At the end, the demon starts moving again with the rest of time, resizing to fit inside the pentagram. The mathematician notes that this trick should keep the demon occupied long enough to find a way to fix this, somehow.

Live Action TV

 * In the new Twilight Zone series, episode "I of Newton", based on a short story by Joe Haldeman, a physics professor is confronted with a demon who'll kill him if he can't find a wish he can't grant. Said genie tells the man that he's capable of doing anything, even the impossible, in physics; and he can go anywhere and is aware of all existence. Teacher finally gets rid of him by "putting his last wish in the form of a command, 'Get lost.'"
 * Aware of all existence? Is he Laplace's Demon?
 * In the original Twilight Zone episode "The Man in the Bottle", a genie grants a man four Monkey's Paw type wishes. The third wish is to become the ruler of a country who can't be overthrown, so the genie turns him into Hitler at the end of World War II. The man's last wish is that all of the previously granted wishes be canceled.
 * VR Troopers and Weird Science both have a villain who wishes to have never met the wish granter. Followed to a letter.

Tabletop Games

 * Mr Welch is officially prohibited from attempting to fuse Logic Bomb and Wishplosion with the phrase "I wish you wouldn't grant this wish."

Video Games

 * In Grim Grimoire, Lillet Blanc summons a Demon King and makes a contract with him to get a wish in exchange for her soul.

Web Comics

 * In one of the Harry Potter parody stories in Sluggy Freelance, Torg is confronted with a djinn who grants two wishes to anyone, although it will try to screw up the wish as much as possible. For some reason, this always entails "randomly" turning the wisher into chocolate. The djinn mentions that should anyone survive the first wish, the second one will be much less twisted. Torg's solution?
 * Later several of the protagonists run into demon-genies who could steal their souls at will and don't have to grant any wishes they don't want to, but like to play games by letting them try to think of wishes that will get them out. They're outwitted by of all people, who in exchange to her soul wishes that Torg not be restrained by them in any way, which they take to mean that they won't restrain them within their own domain, but not allowed to leave. Next Zoë, acting on  instructions, pretends to try to make a wish so dreadful that they would let her go out of sheer admiration. She wishes that
 * Saturday Morning Breakfast Cereal: "I wish I'd gotten that question right." Now the number of electrons in a hydrogen atom is two! BOOM!

Western Animation

 * Chip 'n Dale Rescue Rangers: When Monterey Jack becomes a genie and is captured by Fat Cat, he is forced to grant wishes for the bad guys. He tricks a Mook into making a misguided wish, allowing Chip & Dale to reach the genie's lamp. They wish that none of this ever happened to reset reality.
 * One The Smurfs short had a Literal Genie (who doubles as a prankster trickster), first controlled by Gargamel and then by Papa Smurf. Papa orders the "Genie Meanie" to first undo all the tricks it had performed that day, and his last command to it is to stay in its bottle until it can learn to stop being mean.
 * In an old Sinbad the Sailor cartoon, a genie's last wish will determine whether he is good or evil. The villains have used up the first wish, so the hero is in a quandary. Wishing the villains dead counts as evil, so how can he stop them? He wishes that "none of this ever happened", which counts as a good wish.
 * Likewise, in DuckTales, an evil genie is thwarted by the villain wishing he had never found the genie's lamp, which results in it being lost underground.
 * Extreme Ghostbusters presented a Logic Bomb for an evil genie, "I wish you won't grant this wish."
 * The Fairly Odd Parents had Timmy getting three more wishes that need to solve everything, against a malevolent genie that was thousands of years old and knew how to twist any wish into something horrible. Timmy, realizing he needed someone as conniving as Norm (the genie), wishes for a lawyer, and he made a wish in the form of a giant contract that would reverse everything that was done and couldn't possibly be read any other way.
 * There's also a literal interpretation of Wishplosion, in the form of Magical Backup. If a godparent can't grant wishes to their kids, they explode into confetti.
 * Garfield and Friends episode "Cinderella Cat" features a genie doing a Marlon Brando impression (he's a Fairy "Godfather", get it?). Garfield wishes for lasagna, and the Godfather gets it from a vendor. Garfield wishes for money, and the genie gets it from a bank. Garfield tries to forego his last wish, but the genie insists, so... he wishes for a fairy godmother to appear, who turns out to be his wife. She promptly started berating him, and they both left, leaving Garfield to deal with this book he found...
 * In Danny Phantom, this is always the way to defeat Desiree, the Wishing Ghost. When Danny originally fought her, she was too strong for him to defeat, so he made a wish that she would be imprisoned in the Fenton Thermos. He then berated himself for not realizing to do that when she first appeared.
 * The second time, Danny's friend Sam, having wished that she never met Danny, which caused him to lose his powers, made another wish to undo the damage. Desiree then commented on needing to stop granting every wish she hears as Danny imprisons her again.