Uninstalling modules

You can uninstall custom modules that were installed via NuGet packages. The uninstallation removes all files and code libraries used by the module and all related database objects.

Note:

  • To uninstall modules, you need to open the project in Visual Studio – uninstallation cannot be performed on certain types of deployed and running websites (for example on Microsoft Azure).
  • You cannot uninstall modules that were transferred directly using the Kentico export and import features.
  • You cannot directly downgrade modules to older versions. However, it is possible uninstall a module and then install a package with an older version.

To uninstall a custom module from a Kentico project, you need to:

  1. Uninstall the module’s NuGet package from the Kentico solution in Visual Studio
  2. Open the website in a browser, which triggers automatic removal of the module’s database objects

Warning: Uninstalling a module deletes all web parts, form controls and page types that are part of the module. If the site contains pages of the given type or page templates and forms that use the given components, the module uninstallation may cause errors or missing content on the site. Make sure that you replace or remove all occurrences of the given web parts, form controls and page types.

Uninstalling the module package from the Kentico solution

Uninstalling modules on web farms

If your application is running in a web farm environment, you need to uninstall the module package from the Kentico project for each web farm server.

  1. Open the Kentico solution file in Visual Studio.
  2. Right-click the CMSApp (web application) or CMS (web site) project in the Solution Explorer and select Manage NuGet Packages.
  3. Uninstall the module package:
    • Visual Studio 2012/2013: Open the Installed packages tab of the Manage NuGet Packages window, click Uninstall next to the module package.
    • Visual Studio 2015: Find the module package (you can use the Installed filter), select the Uninstall action and click Uninstall.
  4. On web application projects, you need to Clean and then Build the Kentico solution (to ensure that any module assemblies are removed from the project’s bin folder).

All of the module’s files and libraries are now removed from the Kentico project.

Removing the module’s database objects

To finish the module uninstallation, open your Kentico application in a browser. During the processing of the first request after you uninstalled the module package in Visual Studio, the system automatically removes the module’s database objects.

Tip: You can uninstall multiple custom modules from the Kentico solution, and then perform the removal of the database objects using a single request.

You can verify that the module was uninstalled successfully in the Event log application – confirm that the log contains an event with the MODULEUNINSTALLED code (ModuleInstaller as the source) and no related errors. View the event details () for information about the modules that were uninstalled.