---
title: Uninstalling modules
related:
  - https://docs.kentico.com/13/custom-development/creating-custom-modules/creating-installation-packages-for-modules.md
  - https://docs.kentico.com/13/custom-development/creating-custom-modules/creating-installation-packages-for-modules/installing-modules-from-installation-packages.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

You can uninstall custom modules that were installed via [NuGet packages](https://docs.kentico.com/13/custom-development/creating-custom-modules/creating-installation-packages-for-modules.md). The uninstallation removes all files and code libraries used by the module and all related database objects.

> **Note:** **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 Xperience [export](https://docs.kentico.com/13/deploying-websites/exporting-and-importing-sites/exporting-objects.md) and [import](https://docs.kentico.com/13/deploying-websites/exporting-and-importing-sites/importing-a-site-or-objects.md) 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 an Xperience project, you need to:

1. Uninstall the module's NuGet package from the Xperience 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](https://docs.kentico.com/13/custom-development/extending-the-administration-interface/developing-web-parts.md), [form controls](https://docs.kentico.com/13/custom-development/extending-the-administration-interface/developing-form-controls.md) and [page types](https://docs.kentico.com/13/developing-websites/defining-website-content-structure/managing-page-types.md) that are part of the module. If the site contains pages of the given type or the administration uses the given components, the module uninstallation may cause errors or missing content. 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 Xperience solution

> **Info:** **Uninstalling modules on web farms**
>
> If your application is running in a [web farm environment](https://docs.kentico.com/13/configuring-xperience/setting-up-web-farms.md), you need to uninstall the module package from the Xperience project for _**each**_ web farm server.

1. Open the Xperience solution file in Visual Studio.
2. Right-click the **CMSApp** project in the Solution Explorer and select **Manage NuGet Packages**.
3. Uninstall the module package:
   - Find the module package (you can use the _Installed_ filter), select the _Uninstall_ action and click **Uninstall**.
4. **Clean** and then **Rebuild** the Xperience 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 Xperience project.

## Removing the module's database objects

To finish the module uninstallation, _**open your Xperience administration 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:** **Tip:** You can uninstall multiple custom modules from the Xperience 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.
