Force deactivating a feature using STSADM

First log on to the C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN folder, then run the commands from there (SDSADM.EXE lives in this folder)

Run the following commands to force deactivating and activating the Forms Services feature:
stsadm -o deactivatefeature -filename IPFSSiteFeatures\feature.xml -force -url %SITE_COLLECTION_URL%
stsadm -o deactivatefeature -filename IPFSWebFeatures\feature.xml -force -url %SITE_COLLECTION_URL%
STSADM.EXE -o activatefeature -filename IPFSSiteFeatures\feature.xml -url %Sitecollection_URL% -force
STSADM.EXE -o activatefeature -filename IPFSWebFeatures\feature.xml -url %sitecollection_URL% -force

Issues with repeated SharePoint feature installation

Having recently encountered issues with features not being installed correctly when you are trying to deploy an updated version, I think I have stumbled upon the secret recipie to success:

Deactivate the feature at the appropriate level

Run uninstall.bat to uninstall the feature from any sites where it has been installed.

Copy the new wsp file to your deployment folder

Run install.bat to install the feature to any sites

Wait for a minute, as elements of the site will have been restarted during 4 and rushing causes problems

Reactivate the feature

Clear your browser cache

Shift-refresh the page with the feature on it to be sure of the latest version

This process seems to fix the problems of new items in elements.xml not being made available to site collections where the old version of the feature had previously been deployed.

Moss 2007 – Failed to determine definition for Feature with ID

The root cause of this error is that the Features table in the content database has an entry with the given GUID, but the Objects table in the Config database does NOT have a corresponding object with that ID. 

This gets caused by the following scenario: a solution with a feature gets deployed and activated to a site. The solution gets retracted without first deactivating the feature at the site level.  So, the site has an orphaned entry.

You can resolve this by running the stsadm -o deactivatefeature -id [guid from log] -url [each site it was activated on] -force.