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.
- 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:
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.
- Open the Kentico solution file in Visual Studio (using the WebApp.sln file).
- Right-click the CMSApp (web application) or CMS (web site) project in the Solution Explorer and select Manage NuGet Packages.
- 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.
- 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.