I just deleted an answer I had left to a question because it had been proven to be wrong. It seems that this would be the proper thing to do, since the purpose of the site is to provide correct answers - misleading information is the last thing we all want.
But what if the answer is providing important information about approaches that have been tried and rejected? What if it's an obvious but wrong choice, and others are likely to leave the same answer if they don't see yours? What if there are later responses that refer to yours, and you're removing the context?
As a compromise I waited a day before removing my post. How would you have done it?