How to reset Messages application settings in Mountain Lion?
Messages.app uses many files in various locations for storing information.
To completely start from scratch, all these files must be deleted.


Delete the preference files (there are many of these):

find ~/Library/Preferences -name "*iChat*" -delete

Delete caches:

rm -rf ~/Library/Caches/com.apple.Messages

Delete chat database:

rm -rf ~/Library/Messages



Remember to take a backup before deleting files.