diff --git a/crop.install b/crop.install
index b3e9f26..0b1136f 100644
--- a/crop.install
+++ b/crop.install
@@ -59,3 +59,25 @@ function crop_update_8002() {
   \Drupal::service('config.installer')
     ->installDefaultConfig('module', 'crop');
 }
+
+/**
+ * Uninstall deprecated sub-module from active instance.
+ */
+function crop_update_8003() {
+  if (\Drupal::moduleHandler()->moduleExists('crop_media_entity')) {
+    // Read the configuration.
+    $module_data = \Drupal::config('core.extension')->get('module');
+
+    // Unset the modules you do not need.
+    unset($module_data['crop_media_entity']);
+
+    // Write the configuration.
+    \Drupal::configFactory()->getEditable('core.extension')->set('module', $module_data)->save();
+
+    // Remove from database.
+    \Drupal::database()->delete('key_value')
+      ->condition('collection', 'system.schema')
+      ->condition('name', 'crop_media_entity')
+      ->execute();
+  }
+}
