Solar CPR

It’s easy to forget that even a star can die. They are incredibly ancient by human standards, and their light takes a long time to fade once they’re gone. Faced with the infinite tragedy of a star’s death, multiplied by the billions that have already passed away, the concept becomes incomprehensible in its vast scale.

Well, at least it won't happen to our sun any time soon... right?

Either through natural causes or galactic vandals who go around Star Killing for fun and profit, the local star is set to die; this usually involves You Fail Physics Forever even with liberal uses of Phlebotinum. You can imagine the desperation a planetary civilization will feel when it's their turn to see their sun die. Cue an attempt at Solar CPR. A sufficiently advanced civilization may develop a Magic Antidote or solar-scale World-Healing Wave that can stop this from happening (or at least discover a group of aliens who do).

A civilization facing the natural death of their sun may well use this antidote as the ultimate rejuvenating skin cream to give their sun a few extra billion years of life. Typically, they "kick start Helium fusion", though they may do something much more wonky like reverse the flow of time. Alternately, they might give a gas giant planet or nebula the breath of life and move there.

Anime and Manga

 * Exaggerated in Puella Magi Madoka Magica, in which
 * At least two different versions of Astro Boy end with the title robot making a Heroic Sacrifice in order to do this. At the end of the 1960s anime he flies a device into the sun to stop it from going nova, though he was later brought back to life in three different continuation manga by three different aliens (and one was later retconned to bring it in line with the manga continuity where he never flew into the sun, but that's neither here nor there). In Astro Boy Omega Factor he flies a piece of scrap containing his girlfriend's CPU in to deactivate the remains of the game's final boss before the radioactive alien alloy he's made of starts a deadly chain reaction.

Comic Books

 * In All Star Superman: dies fixing the sun that had been turned red/blue.
 * In Green Lantern, Blue Lanterns can rejuvenate dying stars with the Hope of those on a nearby planet, the process turns the star blue.
 * After Hal destroys the Green Lantern corps, the Sun-Eater was killing Earth's sun, and he does a Heroic Sacrifice that saves it and restores the damage. In the process, it shone green for a day.

Commercials

 * Breakfast-cereal ads have depicted the Sun eating a bowl of their brand to give it the energy to rise in the morning.

Film

 * This is the plot of Sunshine, using a type of bomb to restart Earth's dying sun.

Literature

 * This is the major plot of Gene Wolfe's Book of the New Sun. The Hero goes on an epic journey of self discovery and meets some benevolent aliens with the power to kickstart the sun, but he has to prove himself, and by extension everyone else, worth of the gift.
 * The titular device in The Neutronium Alchemist, the second book of The Nights Dawn Trilogy by Peter F Hamilton is capable of turning gas planets into neutron stars.
 * In Wolfsbane by Frederik Pohl and C. M. Kornbluth Earth's moon is turned into an artificial sun to keep the Earth livable since it was stolen from the solar system by aliens. The moon needs to be relighted periodically.
 * In 2010 by Arthur C. Clarke (Creator) the alien monolith turns Jupiter into a star, which gets the name Lucifer.
 * In The Sands of Mars by Arthur C. Clarke (Creator) Mars's moon Phobos is turned into an artificial star to make Mars more livable for humans.
 * In Phoenix by Clark Ashton Smith the sun is resurrected with a bomb that ignites the elements.
 * This trope triggered the asking of Isaac Asimov's The Last Question.
 * Unusual example in The Voyage of the Dawn Treader, which features a faded star being made to age backwards until it is once more young again to shine. Unusual, because in Narnia's world, stars are angel-like people and the 'CPR' consists of the star eating fire-berries that grow in the valleys of the Sun, brought to him by birds.
 * Implied in Hogfather, where it's said that if the Hogfather (Discworld's answer to Santa Claus, who in this case is actually a minor god who used to be associated with more... primal midwinter celebrations) isn't saved, the sun won't rise on Hogswatch Day. As it turns out,

Live Action TV

 * Star Trek the Next Generation episode Half a Life a planet's sun is going to go supernova in a few years. The one scientist they have whose work has come closest to fixing the problem is required by custom and law to commit suicide at age 60, just a few days away. He refuses, and his planet refuses to use his research because he's a traitor to their way of life.
 * In the Deep Space Nine episode "Second Sight", they used protomatter to reignite Epsilon 119.
 * In Doctor Who, Earth's sun is held back from expanding into a red giant for five billion years, until the funds ran out.
 * At which point they sell tickets to people who want to watch The End of the World As We Know It
 * And when  causes every star in the universe to go nova, Earth survives because a replacement sun  provides a substitute until the damage can be undone.
 * Variation in Stargate SG 1 "Red Sky" when a sun is tainted by heavy metals accidentally introduced to it by the passage of a Stargate wormhole, and the team have to reverse the process by adding even heavier elements to bind the first lot. Needless to say, the usual scale problems are very obvious here.

Mythology

 * Some cultures have believed, or are notorious for having believed, that periodic Human Sacrifice was necessary to invoke this trope.

Tabletop Games

 * At the height of their empire, the Eldar of Warhammer 40000 were not just able to perform solar CPR, they could birth new stars.
 * During the Wrath of the Immortals Story Arc, the player characters have the opportunity to help end the Week Of No Magic that afflicts the world. One result of their success is that it revives the internal sun of the Hollow World, which had shut down in the absence of magic.

Video Games

 * Implied to be an upcoming subplot in Mass Effect 3. In Mass Effect 2, recruiting Tali has her investigating a sun which is dying too quickly. Chances are, in ME3, we get to save such sun.
 * Or, maybe a Chekhov's Gun.
 * Chekhov's Sun?
 * Unfortunately, this became an example of What Happened to The Mouse?? and was never brought up in Mass Effect 3 at all.
 * In the end of Moero! Nekketsu Rythm Damashii! Osu! Tatakae! Ouendan! 2
 * The first level of Super Mario Galaxy involves rescuing one of the Grand Stars stolen by Bowser by turning off a machine that is slowly sucking out its power.
 * The very first Space Quest starts off with Roger Wilco working on a science ship that is carrying one of these devices.

Western Animation

 * An entire episode of Courage the Cowardly Dog is based around this. The sun is repaired by changing a lightbulb.
 * Spartakus and The Sun Beneath The Sea was an old French animated series in which the heroes come from a civilization who live underground After the End, but are forced to journey to the surface world for help after their artificial sun Tehra starts dying.
 * Invader Zim had an episode based on the "Planet Jackers," who steal planets to drop into the sun their home planet orbits, in hopes that their burning will continue to fuel the sun. We didn't get to see if it actually works, but presumably it does since there's evidence that they'd been doing it for a while.
 * At the end of Transformers Energon, Primus uses the Super Energon to recreate the sun of Alpha Q's solar system.