What to do with obsolete posts that are no more correct?
There is no one solution as it depends on situation and just how obsolete the answer is (is it outdated and just needs a minor edit to fine tune it or is it completely wrong and dangerous, or is it somewhere in between). How you proceed also depends on your comfort level with the topic and your own privileges (specifically if you have full-edit privileges or not).
If the post only needs a minor change
- Leave a comment and explain the change and why
- If the author of the answer is still active, hopefully the ping will get him/her to fix
- If the author is no longer active or ignores the ping (after a few days), then go ahead and make the edit yourself.*
- If the edit will completely change the answer (and not just add new info), then see the 2nd solution below.
If the post needs a significant change, is flat out is incorrect now, or the method is deprecated
- Leave a comment and explain why the answer is no longer valid
- Write your own answer, but it should be substantial, still answer the question, and still conform to the site's guidelines. Don't just post a link to a doc or off-site blog.
- Editing in this case is not advisable as an edit would completely change the answer. Editing the obsolete answer just to add "This is obsolete" is also not appropriate. Basically just ignore the original answer aside from leaving a comment.
In either case, the community has decided that deletion is not a correct course of action, so deleting an outdated or obsolete answer is not going to happen. If you flag it, it will be declined.
A final option would be to retag the question with version specific tags. One thing you have to remember is obsolete doesn't always mean not useful to anyone. There are always people forced to use old version of languages and software and so an old solution might still have significant value. This option is not always viable for every situation, but if you have a case where retagging will not invalidate any answers, then it can help eliminate the confusion with out dated answers.
* - If you do not have full edit privileges, then it might be better to see if a 2K-er in chat or in meta can help as a suggested edit stands a good chance of getting rejected. But if you proceed with a suggested edit, make sure your comment is very descriptive