Known Issue in Deactivating feature.


Wanted to point out that if you activate & deactivate the feature repeatedly in the same web application, you will manually need to clean up your web.config file.
Activating the feature will put the safe assembly entries into the web.config, but deactivating it will not remove them. I'm about 99% sure this is a bug in SharePoint itself. I seem to be able to remove entries from anywhere else in the web.config correctly, but this particular spot fails. I've seen third party workflow tools leave orphan entries in this same section. I've noticed that if I have multiple entries for the same assembly in the web.config, odd things happen.