Knowledgebase

Question About Servers

How to Disable or Remove an Odoo Addon Module Print

  • 55

In this guide, we are going to walk you through the process of removing an installed module from Odoo.

 

Uninstalling Odoo Modules

There are two possible instances where you might need to disable or remove an Odoo module after installation.

If you decide that you don’t need the functionality anymore or don’t like the module, you can simply uninstall it from the Odoo Admin Panel

Sometimes, however, things break. A module or incorrect module configuration can cause issues with your Odoo instance and make the graphical interface (Admin Panel) inaccessible.

In that case, you will need to uninstall the module from the command line manually.

 

Uninstalling an Odoo Module from the Admin Panel

Navigate to the Admin Panel of your Odoo instance. If you’re trying to connect to the default Odoo installation locally, enter this URL in your browser:

http://0.0.0.0:8069/

 

Navigate to ‘Apps’.

 

Clear the search filters and enter the name of the module that you’d like to uninstall.

 

Click on the three dots menu and select ‘Uninstall’. 

 

Click ‘Confirm’ in the pop-up window that will appear.

 

Uninstalling an Odoo Module from the Command Line

If you can’t access the control panel, the only way of removing a faulty Odoo module is by manually executing the commands to uninstall it.

Connect to the server where your Odoo instance is hosted via SSH.

When you’re in the terminal, execute the following commands.

 

Switch to the postgres Linux user:

sudo su - postgres

 

Enter the PostgreSQL (Odoo’s database) shell to execute commands within the database.

psql

 

If you remember the name of your Odoo database (the one you specified when you first entered the Admin Panel), than skip this step. Otherwise, execute the command below.

\l

The command will give you a list of table names, users, etc. Find the odoo user and the associated database name.

 

Connect to your Odoo database:

\c test

Note: change test to the actual name of your Odoo database.

 

If you know the exact name of the module you’d like to uninstall, skip this step. Otherwise, execute the following command.

SELECT name FROM ir_module_module;

You will get a list of all module names. Find the needed one.

 

Confirm that you have the correct name of the module. If you do, you’ll see an output with module data after this command:

SELECT * FROM ir_module_module WHERE name = ‘module_name’;

Note: change module_name to the actual module’s name from the previous step.

 

Finally, change the state of the module from ‘installed’ to ‘to remove’. 

UPDATE ir_module_module SET state = ‘to remove’ WHERE name = ‘module_name’;

Note: change module_name to the actual module’s name from the previous step.

If the update was successful, you should see the 'UPDATE 1' output. If you see 'UPDATE 0', it means that the module with the specified name was not found.

 

Exit PostgreSQL:

\q

 

Exit the postgres Linux user:

exit

 

Reload the Odoo service:

sudo service odoo13 restart

Note: depending on how you installed it, you might need to change odoo13 to odoo.

 

Now, the Odoo module should be uninstalled.

 

If you still can’t access the Odoo web interface, try to repeat the step above to enter the PostgreSQL and connect to the Odoo database. Then, execute the following command:

UPDATE ir_module_module SET state = ‘uninstalled’ WHERE name = ‘module_name’;

Note: change module_name to the actual module’s name from the previous step.

 

Exit PostgreSQL:

\q

 

Exit the postgres Linux user:

exit

 

Reload the Odoo service:

sudo service odoo13 restart

Note: depending on how you installed it, you might need to change odoo13 to odoo.


Was this answer helpful?

« Back

Enterprise-Grade Hardware

  • Samsung
  • Juniper
  • Western Digital
  • Supermicro
  • LSI
  • Intel
  • R1Soft Backups
  • cPanel
  • MySQL
  • Parallels
  • HP Partner