Skip to content

Uninstall and cleanup a module instalation

Salih Emin edited this page Aug 4, 2020 · 1 revision

During development you may want to uninstall module, follow the steps below:

Step 1: Delete Module

create a uninstaller.php file in the root of your vtiger. Add the following lines, changing the ModuleName field with the module that you want to uninstall.

<?php

include_once 'vtlib/Vtiger/Module.php';

$Vtiger_Utils_Log = true;

$module = Vtiger_Module::getInstance('<ModuleName>');
if ($module) $module->delete();

then run :

sudo php uninstaller.php

Step 2: Delete Folders

Module folders and files needs to be removed manually. Following are the location where its references exists.

modules/ModuleName
languages/en_us/ModuleName.php
languages/.../ModuleName.php
layouts/vlayout/modules/ModuleName
cron/ModuleName

Step 3: Delete Data

Module stores data in the database-table, you may want to delete / truncate the same.