diff --git a/core/lib/Drupal/Core/Extension/ModuleInstaller.php b/core/lib/Drupal/Core/Extension/ModuleInstaller.php
index 92bdb80..768d1ef 100644
--- a/core/lib/Drupal/Core/Extension/ModuleInstaller.php
+++ b/core/lib/Drupal/Core/Extension/ModuleInstaller.php
@@ -461,6 +461,19 @@ public function uninstall(array $module_list, $uninstall_dependents = TRUE) {
     // Let other modules react.
     $this->moduleHandler->invokeAll('modules_uninstalled', array($module_list));
 
+    // Clean the storage schema of entities that are gone because their modules
+    // were uninstalled.
+    $key_value_store = \Drupal::keyValue('entity.storage_schema.sql');
+    $schema = $key_value_store->getAll();
+    $entities = array_keys(\Drupal::entityManager()->getDefinitions());
+
+    foreach ($schema as $item_name => $item) {
+      $entity_item = substr($item_name, 0, strpos($item_name, '.'));
+      if(!in_array($entity_item, $entities)) {
+        $key_value_store->delete($item_name);
+      }
+    }
+
     // Flush all persistent caches.
     // Any cache entry might implicitly depend on the uninstalled modules,
     // so clear all of them explicitly.
diff --git a/core/modules/system/src/Tests/Entity/EntitySchemaTest.php b/core/modules/system/src/Tests/Entity/EntitySchemaTest.php
index 5ce61be..695c0e8 100644
--- a/core/modules/system/src/Tests/Entity/EntitySchemaTest.php
+++ b/core/modules/system/src/Tests/Entity/EntitySchemaTest.php
@@ -139,4 +139,38 @@ public function testModifyingTranslatableColumnSchema() {
     }
   }
 
+  /**
+   * Tests fields from an uninstalled module are removed from the schema.
+   */
+  public function testCleanUpStorageDefinition() {
+    // Find all the entity types provided by the entity_test module and install
+    // the schema for them.
+    $entities = \Drupal::entityManager()->getDefinitions();
+    foreach ($entities as $name => $definition) {
+      if ($definition->getProvider() == 'entity_test') {
+        $this->installEntitySchema($name);
+      };
+    }
+
+    // Uninstall the entity_test module.
+    $this->container->get('module_installer')->uninstall(array('entity_test'));
+
+    // Get a list of all the entities in the schema.
+    $key_value_store = \Drupal::keyValue('entity.storage_schema.sql');
+    $schema = $key_value_store->getAll();
+
+    $item_count = 0;
+
+    // Count the storage definitions that begin with entity_test.
+    foreach (array_keys($schema) as $storage_definition_name) {
+      $entity_item = substr($storage_definition_name, 0, strpos($storage_definition_name, '.'));
+      if ($entity_item == 'entity_test') {
+        $item_count++;
+      }
+    }
+
+    // Ensure that all storage definitions have been removed from the schema.
+    $this->assertEqual($item_count, 0, 'After uninstalling entity_test module the schema still contains fields for the the entity_test entity.');
+  }
+
 }
