I recently wrote an answer to a question, that, while not wrong, didn't provide the full picture. My answer got a few upvotes and nobody seemed to disagree with it.
Then someone else posted a more correct answer, in light of which I no longer considered my answer adequate.
Editing my answer would be pointless, since it more or less would end up repeating what the other person said. But I also didn't feel comfortable keeping my answer up, especially given that it had more upvotes than the better one (at that point), so I decided to delete it.
I know this is rather specific, but what would be considered the correct approach here?