diff --git a/update.php b/update.php
index 403d4b7163ddfb184e8e02f14d830d7a62a820d5..3105cbc5565ed15b254ec3c6da0c74df8c103608 100644
--- a/update.php
+++ b/update.php
@@ -419,6 +419,13 @@ function update_do_updates() {
   else {
     $percentage = 100;
   }
+
+  // $update['module'] will be unset (the while loop above wasn't entered) when
+  // we are finished with all updates. Clear the cache.
+  if (!isset($update['module'])) {
+    db_query('DELETE FROM {cache}');
+  }
+
   return array($percentage, isset($update['module']) ? 'Updating '. $update['module'] .' module' : 'Updating complete');
 }