diff --git a/catalogue/DropSchemaCmd.cpp b/catalogue/DropSchemaCmd.cpp
index bb691b6584e55c760e7cc426607192f5bf195243..465bd502a32c00deb0b9b96a46244be544615d96 100644
--- a/catalogue/DropSchemaCmd.cpp
+++ b/catalogue/DropSchemaCmd.cpp
@@ -242,6 +242,7 @@ void DropSchemaCmd::dropOracleCatalogueSchema(rdbms::Conn &conn) {
       "TAPE",
       "TEMP_TAPE_FILE_BATCH",
       "TEMP_TAPE_FILE_INSERTION_BATCH",
+      "TEMP_REMOVE_CASTOR_METADATA",
       "REQUESTER_MOUNT_RULE",
       "REQUESTER_GROUP_MOUNT_RULE",
       "ADMIN_USER",
diff --git a/catalogue/oracle_catalogue_schema_header.sql b/catalogue/oracle_catalogue_schema_header.sql
index f3345ec826663234eadbfa4c9a9bc5d3edb049a0..c3814a76e19cc1f488fb22a211948ea55b2b5af1 100644
--- a/catalogue/oracle_catalogue_schema_header.sql
+++ b/catalogue/oracle_catalogue_schema_header.sql
@@ -33,3 +33,7 @@ CREATE GLOBAL TEMPORARY TABLE TEMP_TAPE_FILE_INSERTION_BATCH(
 )
 ON COMMIT DELETE ROWS;
 CREATE INDEX TEMP_T_F_I_B_ARCHIVE_FILE_ID_I ON TEMP_TAPE_FILE_INSERTION_BATCH(ARCHIVE_FILE_ID);
+CREATE GLOBAL TEMPORARY TABLE TEMP_REMOVE_CASTOR_METADATA(
+  ARCHIVE_FILE_ID       UINT64TYPE
+)
+ON COMMIT DELETE ROWS;
diff --git a/cta.spec.in b/cta.spec.in
index 744021896e797521c25552b9162207054bb38818..f829d2fd229d689773dc6147aa46c0709ea6c879 100644
--- a/cta.spec.in
+++ b/cta.spec.in
@@ -318,9 +318,10 @@ directory metadata into the EOS namespace.
 %attr(0755,root,root) %{_bindir}/json-pretty-print.sh
 %attr(0644,root,root) %{_bindir}/begin_vo_export_to_cta.sh
 %attr(0644,root,root) %{_bindir}/export_production_tapepool_to_cta.sh
-%attr(0644,root,root) %{_bindir}/vmgr_reenable_tapepool.sh
 %attr(0755,root,root) %{_bindir}/tapepool_castor_to_cta.py
 %attr(0755,root,root) %{_bindir}/complete_tapepool_export.py
+%attr(0644,root,root) %{_bindir}/vmgr_reenable_tapepool.sh
+%attr(0644,root,root) %{_bindir}/cta-catalogue-remove-castor-tapes.py
 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/cta/castor-migration.conf.example
 
 %package -n cta-rmcd