How to remove a mistakenly installed module

  • 7022547
  • 12-Jan-2018
  • 18-Dec-2019


Retain Unified Archiving 4.2 and later
MySQL on Linux


I have installed a module by mistake. How can I remove it?



This knowledgebase (KB) article is provided for informational purposes only and as a courtesy service to you, our customer. GWAVA Technical Support does not have any database administration (DBA) expertise, nor does it provide DBA services or support. GWAVA is not responsible for the results of implementing any of the concepts contained in this KB article. Implementation of any of the concepts suggested in this KB article shall be done entirely at your own and sole risk, and GWAVA does not provide any kind of warranties whatsoever resulting from your decision of implementing any of the KB article’s concepts. It is up to you to do any research and to ensure yourself that any implementation and setup of any of the KB article’s concepts in your database system is correctly and properly executed. It is imperative that you have backups of your database system and storage directory before making any implementation. If you don’t have any DBA expertise, you should consult with a DBA expert before any implementation of the KB article’s concepts.  Under no circumstances, shall GWAVA, or any of its employees, be liable, in contract, tort, delict or otherwise, whether negligence is provable or not, for any direct, indirect, incidental, special, punitive, consequential or other damages, loss, cost or liability whatsoever that would result from or are related to the implementation of any of the concepts suggested in the KB article. To the extent permitted by applicable law, GWAVA shall not be liable to you for any special, consequential, direct, indirect or similar damages, including any loss of data, arising out from migrating any type of messages, attachments, database, metadata in your Retain system to another server and/or location.


This procedure should only be used to remove modules that (a) have been installed in error and (b) have not been used to archive any email.  

Each module generates an ID which is unique and must be in the system as it connects the archived mail with the Post Office/mail system and the attached items so it must not be deleted.

1. Back up your Retain database
2. Stop Tomcat
3. Connect to your Database

4. Run SELECT * FROM t_modules;

5. If you would like to delete module "Groupwise-delete" for example, you have to delete other entries first. Otherwise you will get the following error:

Cannot delete or update a parent row: a foreign key constraint fails (`retain`.`t_modopt`, CONSTRAINT `FKMODPROP2MOD` FOREIGN KEY (`f_option_id`) REFERENCES `t_modules` (`f_id`)) */

Note the relevant f_id of the module you would like to remove.

6. Run DELETE FROM t_modopt where f_option_id = f_id;

For this example:

DELETE FROM t_modopt where f_option_id = 16;

7. Now you can delete the faulty entry from t_modules by running

DELETE FROM t_modules where f_id = 16;

8. Start Tomcat
9. Check if the module was successfully removed from the Retain webinterface.