score:12
I believe you are thinking of Herostratus
, the name of the man for whom the law was created (according to the History, he set fire to the temple of Artemis in Ephesus just in order to be famous and recorded in the History1)
More generally, that law (and other similar like those of romans, egyptians and the like) are usually called damnatio memoriae
; usually they were applied against previous rulers or powerful officials who had fallen of grace, and included destroying their statues, erasing any written (or sculpted) apparition of their name.
Note: Ostracism was the name of exile. The name came because, being a severe punishment, it was usually decreed by all voting members of the polis which used ceramic pieces (ostrakas) to vote.
1: As you can see, he succeeded and the law failed.