Removing second copy of ctools module from filesystem I have a site where two version of ctools are on the filesystem.

The first version is in sites/all/modules - this is correct and where I want it
The second version is in sites/all/modules/contrib - this isn't correct and was placed there by custom formatters make file.

The registered path in the system table is sites/all/modules/contrib. I want to remove the contrib folder as it shouldn't exist and is causing issues when I want to upgrade ctools using make files.

Removing the folder gives an undeclared function error as drupal expects it in that contrib folder. Using drush registry rebuild isn't an option as the error still appears because ctools is embedded so deep.

Changing the paths in the system table still brings up the undeclared function error, this could be caused by APC caching though.

Is there a simple way of removing references to this folder and using the copy of the module in sites/all/modules without causing such a huge impact?
Unless you have apc.stat = 0, then APC caching is likely not the problem.  You can always set apc.enabled = 0 as a temporary measure until you get the problem fixed.

What version of Drupal?

If you are on Drupal 7, you could try deleting the extra copy and then running Registry Rebuild via drush.  Follow the instructions on the project page.

The other method that should work for Drupal 6 and 7 would be to take a database backup, and then hand edit the {system} table.  If it has both "sites/all/modules/coots" and  "sites/all/modules/contrib/coots" in it, delete out the contrib entries.  If it just has the "sites/all/modules/coots" entries, edit them to take out contrib.  Then manually clear out all of the cache tables.

Make sure you backup your database no matter what you do.  Both of these are dangerous operations.