Mayor of a Ghost Town

Something happens to a city. It could be an evacuation or a disaster. Whoever's left over will now have the run of the city, and they can use its resources to attempt to comunicate with the outside world, try to find more survivors or just have fun without anyone to stop them from breaking the rules.

Anime and Manga

 * One of the countries that Kino encounters is the last remaining member of a "democracy" that voted by majority. Ultimately, everyone else had voted each other to death until one man was left.

Film

 * I Am Legend follows this premise.
 * The Quiet Earth: With apparently no-one else left on Earth, protagonist Zac Hobson sets a radio station to emit a message in case anyone's out there, moves to a mansion, raids shopping centres, plays with train sets in a store- and then the real trains- cracks up, starts dressing up in women's clothes and declares himself emperor of the world before an audience of cardboard cutouts. (He gets better.)
 * The French movie Seuls Two (that's the original French title, no idea if it has an english one; A rough translation is "Two Alone") is about two people waking up in a completely deserted Paris.
 * In The Omega Man, Charlton Heston doesn't take much advantage of this trope, since he spends his time hunting zombies. However, his love interest, Lisa, likes to go "shopping" in abandoned department stores. At least until she gets The Virus and does her Face Heel Turn.
 * In Night of the Comet, the two protagonist teenage girls spend much of their time looting abandoned department stores for cool clothes.
 * The main cast from 28 Days Later have a Hope Spot moment raiding food from an abandoned store, and in the first scenes, Jim absconds with a bag full of soda cans from a derelict vending machine. On a darker note, since the original owners are dead, the soldiers have set up camp in an abandoned country estate, and govern from there, at one point
 * In one of the short films made with the sequal, a man left in this situation kills himself out of loneliness. As he's dying he hears the helicopters returning.
 * The protagonists of both the original Dawn of the Dead and |the remake do this on a smaller scale with a shopping mall. In fact, this is largely the point (of the older movie, at least). It gets very Anvilicious when you see the little perfect world the protagonists have constructed for themselves, with things "borrowed" from the mall. The zombies are largely a distraction from the commercialism-things. Sorry for Fan Wank.
 * The heroes of Zombieland don't limit themselves to one town, but they raid grocery stores for food (in search of the elusive Twinkie), trash a store just for fun and crash for a while in Bill Murray's mansion (which isn't as abandoned as they thought).
 * In Freddy's Dead, there are no children or teens left in Springwood, yet the adults still put on a pitiful show of a town fair, complete with kiddie entertainments no kids are around to enjoy. The school and orphanage are likewise left to fall apart, each with a crackpot staff member left behind to pretend they still have kids to teach or care for.

Literature

 * The Stand had one bomb-happy character blow up oil storage silos for the explosions, since no-one was going to stop him.
 * Hell, half of the secondary characters, especially those left in NYC, go wild with their fantasies. One guy runs into two survivors in the park and tells them he's gleeful the world is gone. Why? There's no one left to stop him from jerking off on home plate at Yankee Stadium. This is one of the few relatively benign examples.
 * Ofelia from Remnant Population stays behind after the rest of her colony is moved to another planet, and she is left as the only human on the entire world. She's not completely alone, though...
 * The protagonist of the post-pandemic London of John Christopher's novel Empty World.
 * This trope is a plot point in the zombie-apocalypse novel World War Z. When The Cavalry finally arrives in some reclaimed towns, they are never quite sure if the Mayor has all his or or her marbles.
 * Jadis, the Last Queen of Charn from The Chronicles of Narnia. In The Magician's Nephew, we find out that she single-handedly eradicated every other lifeform in her universe because her sister had raised a rebellion against her queenhood; with her sister's army at the door, she proved herself to be a sore loser. She then magically preserved herself as a statue until the heroes accidentally freed her, then hitched a ride with them to Earth and ultimately to Narnia, where she became known as the White Witch.
 * Played literally in the children's book Ghost Town Adventure. A family on a road trip comes across Ruby, a Ghost Town with exactly one resident - Mayor Abe Winters. It had been a thriving town during a gold rush but when the gold dried up everyone else in town abandoned the place. Abe figures that even though his term expired he's still the mayor until he gets voted out.

Live Action TV

 * Red Dwarf follows this premise. A radiation leak kills the entire crew of a ship the size of a city, leaving only the initial cast.
 * On Mystery Science Theater 3000, the robots are asked what they would do in this situation. Servo would put bricks on accelerators and drive cars off cliffs all day. Crow would put on football pads and dive through pane glass windows up and down main street.
 * My Name Is Earl had a flashback episode where the main characters think that Y 2 K has killed everyone else in town so they move into a supermarket and each of them claims part of the store as their own personal domain.

Video Games

 * Father Grigori of Ravenholm.
 * Thumper's ending in Twisted Metal.
 * The mayor of West Shanbar in Return to Zork.
 * Dragon Quest VII has this happen to Suifu in the Penal Colony where all the refugees/prisoners from Dharma Shrine are being held. Once the problems are solved, he finds himself alone, ruefully admitting that he'll never enjoy the sort of power and position he was able to claim for himself there.
 * Suikoden V's Tageyl stands on the verge of this: Lordlake has fallen out of favor with the queen and is slowly dying without any water.
 * Impaz from The Legend of Zelda: Twilight Princess, the last inhabitant of the Hidden Village, who turned down a chance to escape from her Bulblin-occupied village so she could give the Ancient Sky Book to the messenger of the heavens (a.k.a. Link).
 * King Daphnes Nohansen Hyrule from The Legend of Zelda the Wind Waker is the only person left in Hyrule after it got sealed beneath the Great Sea, using his position to guide Link and awaken Zelda..

Web Original

 * Played for laughs in Homestuck. The Wayward Vagabond, a non-human wanderer of post-apocalyptic Earth, is fascinated enough by the idea of democracy that he becomes a mayor over a stash of cans.
 * It's less humorous now that we know that he did this

Western Animation

 * Named for the The Simpsons episode in which Homer divides Springfield into two towns, Old Springfield and New Springfield. When Homer erects a wall to this effect, the citizens of Old Springfield quickly realize that they suddenly have no means of obtaining supplies. All but the Simpson family climb over the border, leaving a disgruntled Homer alone, to which Bart says 'Face it Homer, you're mayor of a ghost town!'
 * Homer also has the run of Springfield for about half a Treehouse of Horror segment, after a Neutron bomb kills all the people.
 * Moe became mayor (emperor) of the starved lawless en-domed Springfield in the deleted scenes of The Simpsons Movie.
 * Pinky and The Brain, when Brain manages to take over the world by luring all its inhabitants to the doppelganger planet Chia Earth (which is made of papier-mache). In the end, he goes so mad with the boredom of ruling an empty planet that he decides to put forward a bunch of bills, then use his presidential powers to veto them. For fun.
 * This is how an alternate-future version of Vandal Savage has lived for several years centuries in the Justice League episode, "Hereafter."
 * In the Grand Finale of Avatar: The Last Airbender, Ozai apoints Azula as the new Fire Lord while he goes off to end the war (and gives himself a new title denoting supreme ruler of the world). Azula's increasing instability and paranoia means she ends up gradually banishing every member of the Royal Household (and, possibly, everyone in the Fire Nation capital) other then the few people needed to coronate her.
 * An episode of Duckman had the whole town perform an "emergency drill", only to get trapped in the shelter underground. Only Duckman (who slept through the alarm) and a deaf woman (who couldn't hear it) remain, convinced they are the last people alive. So Duckman engages in his every hedonistic desire; tooling around in a motorcycle, stealing things, blowing up buildings, and unknowingly causing hell for the people trapped below.
 * BIONICLE plays with this in the description of what the Toa Of Light was flying around doing in other dimensions. The villanious/HeelFaceTurn applying Toa Tuyet in an alternate dimension specifically ignored and never mentioned outside of descriptions of said alternate dimension) specifically says (while contemplating drowning everyone in the alternate universe) that she would be ruling over an empire of corpses.