How do you eradicate a disease?
You must first discover the cure before you can eradicate a disease. Otherwise, some diseases could begin the game eradicated. From the rulebook, page 4:

Treat Disease

If the last cube of a cured disease is removed from the board, this disease is eradicated. Flip its cure marker from its “vial” side to its “0” side.

Discover a Cure

[...]If no cubes of this color are on the board, this disease is now eradicated. Flip its cure marker from its “vial” side to its “0” side.


And:

Removing the last cube of a disease that is not cured has no effect.