diff --git a/uc_order/uc_order.install b/uc_order/uc_order.install
index bacd993..1b14cb2 100644
--- a/uc_order/uc_order.install
+++ b/uc_order/uc_order.install
@@ -240,3 +240,16 @@ function uc_order_schema() {
 
   return $schema;
 }
+
+/**
+ * Implements hook_uninstall().
+ */
+function uc_order_uninstall() {
+  $statuses = \Drupal\uc_order\Entity\OrderStatus::loadMultiple(NULL);
+  if (!empty($statuses)) {
+    foreach ($statuses as $status) {
+      // Unlock OrderStatus configuration entity so it can be deleted.
+      $status->setLocked(FALSE)->save();
+    }
+  }
+}
