Deprogram

One especially horrifying bit of Nightmare Fuel happens when a character is Brainwashed, hypnotized, or thoroughly messed up psychologically the good old fashioned way. While everyone imagines they'll be able to resist or be snapped out of it by a friend crying out "I know you're in there somewhere, fight!", this isn't always the case. A villain who does their laundry with care and thorougly bleaches, softens, rinses and dry-cleans the brains they wash will give their victim's brains incredible resistance against free will spills, love stains, and friendship fudge. Meaning that restrained heroes will still be brainwashed and pose a serious danger to them. The solution is Deprogramming.

In real life, deprogrammers resorted to questionable, and often cruel lengths to do their job. What most people think of with deprogramming is more akin to therapy and "exit counseling" in that it attempts to help the person come to terms with what's happened, not forcibly change their mind. While fiction may follow this route, it's also likelier to be complemented with a good old round of Epiphany Therapy, a Battle in The Center of The Mind, "sunbathing" under a Care Bear Stare, and a quick blow to the head (in one form or another).

The net result is that the character is now good as new!... except for the part where they'll freak out when they realize they (could have) hurt their friends. To make things worse, once a victim of Mind Control is freed there will always be that niggling feeling that there remains residual programming, or the former brainwasher can do it again. Because of this there's the chance of the character being Reformed but Rejected because of a potential Pygmalion Snapback.

Not related to Brain Bleach.

Comics
"Ward, the Beaver blew up another Dairy Queen today!"
 * Played for Laughs in Bloom County, when the protagonists rescue Bill the Cat from a cult and have to "reprogram" him to be normal. The last panel shows him tied to a post, forced to watch a show which is clearly parodying Leave It to Beaver.

Literature

 * The Hunger Games portrays a long, unpleasant treatment for a long, unpleasant torture.
 * Good Behavior, part of the Donald Westlake Dortmunder series, involves the group of criminals having top rescue a young nun from the deprogramming efforts of her corporation-owning father.
 * Let Our Children Go by Ted Patrick is about the author's practice of old-fashioned deprogramming of young cult members, including kidnapping, imprisonment, and violence. The other Wiki declared him as "widely considered to be the `father of deprogramming.'" He was given the moniker "Black Lightning."

Live Action TV

 * One especially heartbreaking episode of The Outer Limits, "The Deprogrammers", has a scientist and his assistant deprogram the personal servant of an alien from a race that has conquered the Earth in order to assassinate him. It ends with
 * Star Trek the Next Generation and Star Trek Voyager both dealt with deprogramming Borg, which surprisingly did not lead to a literal deprogramming considering their cyborg nature.
 * The TNG Tie-In Novel Vendetta by Peter David has a much darker take on Geordi's attempts to deprogram a Borg Drone.
 * At the end of "The Mind's Eye", a TNG episode in which Geordi is turned into a Manchurian Agent, we get a brief look at Troi starting the deprogramming.
 * An episode of Stargate SG-1 involved deprogramming Teal'c after he'd been brainwashed by Apophis in the previous episode. Lets just say the deprogramming methods were nearly as traumatizing as the programming methods...
 * An early episode of SG-1 had Teal'c's son brainwashed by Apophis. Here, the deprogramming techniques were a bit of shouting, and shock therapy administrated with a rather handwavey phaser blast.
 * Possibly justified in-universe by the fact that Apophis used advanced alien technology to brainwash each of them in a matter of hours in the first place. Regular therapy and counseling may well have proven useless.
 * An episode of Airwolf had a "miracle deprogramming cure" in a syringe.
 * In Monk one happens, when Adrian gets sucked into a cult.

Tabletop RPG

 * Vampire: The Requiem actually provides two game systems for deprogramming victims of the the Dominate power "Conditioning" and the VII faction of Sleepers who create vampire blood based brainwashing. Some of the brainwashing powers even provide their own cure; one of the side effects of The Forgetful Mind (which covers up another person's memories) is that it allows you to uncover a person's buried memories, even if you weren't the one who buried them in the first place.
 * In the book Antagonists, White Wolf's writers note that deprogramming as generally thought of is really brainwashing back to social norms. It even uses the same system as brainwashing, just with different modifiers.

Video Games

 * In Metal Gear Solid's official mission handbook, there is a section at the beginning of the game profiling all the major characters, complete with stats and a biography. For Decoy Octupus's entry, it notes at the end that "The stress and combination of getting into character lead to Decoy Octopus becoming confused and almost completely changing into the person he mimics In order to protect himself, every time he disguises himself as someone else, he asks the military for an extensive mental deprogramming afterwards." Based on the tone, it gives the impression that this sort of thing happens on a regular or reoccurring basis.

Webcomics

 * Better Days: This was how Nikki recovered from her Abusive Parents.
 * Last Res 0 rt has Gabriel, a doctor who specializes in exit counseling to help people leave the Church of the Endless. He attempts to offer his services to Jigsaw, except Oh, and did we mention he's also a Celeste...

Web Original

 * Bastard Operator From Hell had an episode where PFY discovered that one colleague was a Mac User -- and he seemed like a normal person. For years he'd been living a lie! So, that's the only solution. And then PFY himself turned out to be -- and promptly got zapped and strapped to a wheely chair by caring BOFH.

Western Animation

 * Aang and the gang tried this with from Avatar: The Last Airbender. Results were mixed.
 * Hank had a problem with this in King of the Hill. His niece AND wife had been tricked into joining a high school sorority that was into Brainwashing it's members. Hank saved the day with.
 * The Simpsons: When Homer & family joined the Movementarians cult, he was rinsed with one drop of beer, and Bart, Lisa & Maggie were converted back to normal by the promise of hoverbikes.
 * In the same episode, Groundskeeper Willie attempts to deprogram Homer shortly before he's reintroduced to beer, and becomes accidentally programmed into joining the Movementarians himself in the process.
 * In another episode, Bart went to live with Mr. Burns, so Homer and Marge hire a man to abduct Bart and deprogram him. Then it turns out that he grabbed Hans Moleman instead, who now believes himself to be Bart. Homer wants to keep him (partly because kissing him is like kissing a peanut), but Marge ends the episode with "Homer, I want that thing out of my house."
 * After in Return of the Joker, it is mentioned offhand that it took well over a year of intense therapy to make him sane again. Judging by some of his reactions, he still isn't entirely over it some 40-50 years later.

Real Life

 * This is supposed to help victims of Stockholm Syndrome and indoctrination (such as with Child Soldiers or members of Cults) become free from the psychological grip of their tormentors. Originally, deprogrammings tended to involve kidnapping, and confinement, as well as violence and other types of psychological abuses (including in the worst cases, rape), which is why many detractors of the technique would say that it is really just reverse brainwashing. However, after the public got wind of those practices through various court cases (one of which involved the attempted deprogramming of a Catholic nun), and got upset, those types of deprogrammings have become less common (although still done in some countries).
 * Since the validity of true brainwashing has largely been debunked, and such extreme measures are often seen as doing more harm than good, modern deprogrammings, more aptly called "exit counseling", rely on a lot of therapy and time, and the after-effects may take years to be resolved, if ever.