Web.Config Modification Cleanup Installer (v1.1 - 18th Mar 2013) : Download Installer
Notes : Add the ability to undo any deleted modifications (during the same session).
Web.Config Modification Cleanup was made to assist with the cleanup of the SharePoint web.config modifications.
When web.config updates are performed, as recommended by Microsoft, entries are added to the web application web.config file. Not all software was written to remove those entries when it is uninstalled. Sometimes, in the process of developing SharePoint solutions, entries can be added to test out some programming code, and those entries aren't removed.
If you manually remove those entries from the web.config file with a text editor, you'll find that they reappear as SharePoint updates them later on in certain scenarios. Manually updating the web.config is required sometimes, but it's better off if you don't do that. Any software that is deployed to SharePoint should update the web.config the proper way.
All the modifications that have been performed to the web.config will be visible in the list.
Clicking on one of the entries will show you the details of the modificatio on the right. It will also check the box for that entry.
You can check the box for any number of entries. Once you have selected all the ones you want to remove, click on the Cleanup button. This will remove those entries from the appropriate web.config. The cleaned up entries are persisted in memory, only for the time the instance of the application is running. While it is running, if you feel like you've deleted entries that you shouldn't have, you can click the Undo button and it will add those entries back.
Both the Cleanup and the Undo will popup confirmation message boxes.
To properly add and remove entries in the SharePoint web application web.config files, Microsoft has posted an article on MSDN which I highly recommend : How to: Add and Remove Web.config Settings Programmatically
This tool is not recommended for a production environment. Removing entries from the web.config can have potentially detrimental effects on the SharePoint environment.
You should only use this in a development/demo/test environment, to assist in issue analysis and help with better software development.