(Covers information from Anderson's universe)
The anti-virus is the only compound capable of purging the T-virus. It was created by Dr. Charles Ashford as a means to help his daughter, Angela Ashford, to retain her mobility and keep the t-virus mutation in her system in check.
A second more potent anti-virus was created by Umbrella around ten years after the Global T-Virus pandemic began. This one was airborne, capable of spanning the globe and would kill anything infected by the T-virus upon contact.
In its liquid state, the anti-virus' visual cue is green, as opposed to blue like its video game counterpart. While it is known to cure t-virus-related infection, the anti-virus is not a fool-proof antigen. Rain Ocampo, who had been bitten several times and spent over an hour in an infected state, died and reanimated as an Undead a few minutes after being administered the anti-virus. Dr. Alexander Isaacs was bitten and infected by a Super Undead, and several massive doses of the anti-virus could not save him from extensive mutation. It was even implied by Slater that the anti-virus could mutate Issacs; this is possible as the anti-virus, despite being a cure, can be dangerous if taken in massive doses similar to real-world medicines like paracetamol.
However, it did work for Carlos Olivera three hours after he was bitten by his infected partner, Yuri Loginova. It is likely that the dosage of the t-virus in Rain's body was significantly more than in Carlos' as a result of being bitten more than once, thereby increasing the overall dosage and giving her a smaller time frame in which to safely inject the anti-virus without mutation. However, when Carlos was infected a second time, even though there was only a few hours between infection and arriving at the North American Research Facility, Carlos believed that his infection was too far long to be cured and didn't even attempt it.
In Resident Evil: Extinction, the White Queen explained that because of Alice's unique situation as the only human to bond with the T-virus, her blood contained a possible cure or anti-virus to the t-virus, which had since swept across the globe. Umbrella's North American Research Facility contained all of the equipment that she needed to create another cure, but whether or not Alice attempted the endeavor is never revealed.
In Resident Evil: The Final Chapter, Alice is contacted by the Red Queen following the betrayal of Albert Wesker. The Red Queen informs Alice that humanity will be destroyed within 48 hours by Umbrella and their Undead armies and the only hope is a new anti-virus created by Umbrella. This new anti-virus is designed to kill anything infected by the T-virus on contact and is airborne, meaning that if released, it will span the globe and end the pandemic for good. However, the anti-virus is within the Hive in the ruins of Raccoon City, forcing Alice to return to the Hive. Guided by the Red Queen, Alice makes her way into the depths of the Hive where she discovers the only vial of the new anti-virus in the hands of Doctor Alexander Isaacs, the man who was responsible for the pandemic in the first place. Isaacs threatens to release the anti-virus in the closed environment of the Hive, preventing it from having any effect on the Earth's surface in order to force Alice's surrender. With the help of the Red Queen and Alicia Marcus, Alice and Claire Redfield are able to get free and chase Isaacs for the anti-virus. After apparently killing Isaacs, Alice is able to take the anti-virus from him and heads to the surface where she attempts to release it. Her attempt is thwarted by Isaacs briefly before he is killed by a clone of himself. Alice then drops the container holding the anti-virus upon the ground, shattering it and releasing the anti-virus. The anti-virus quickly kills the thousands of Undead nearby and destroys Alice's infected cells, knocking her unconscious for several hours. Following its release, the anti-virus begins to spread across the globe and wipe out all of the Undead and varied mutations, but will have to travel on the winds and so could take several years to span the entire globe.