# Installing and Uninstalling Packages

This article will cover the process of installing as well as uninstalling packages from your Umbraco CMS website.

## Installing packages

In the Umbraco Backoffice, you will find a **Packages** section that displays the [Umbraco Marketplace](https://marketplace.umbraco.com/). From here you can browse all community-made as well as official Umbraco packages for the Umbraco CMS.

![Backoffice - Packages section](https://3872888104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgEH4FChbCn7eDDqREvdE%2Fuploads%2Fgit-blob-f14549ef229e55991723d8b0c44d6f623b81fec2%2Fbackoffice-packages-section.png?alt=media)

Navigating to a specific package in the section will present you with an overview of the package, as well as an install snippet for NuGet CLI.

![Backoffice - Starter Kit package](https://3872888104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgEH4FChbCn7eDDqREvdE%2Fuploads%2Fgit-blob-c31ad8034781bae8ad4d4fc5d47c533d30cc524c%2Fbackoffice-packages-section-package.png?alt=media)

The packages can be installed by using:

* **NuGet Package Manager** in Visual Studio
* **Package Manager Console** in Visual Studio
* .NET CLI (usually accessible from the terminal/command prompt of your system)

For example, to install the StarterKit package for the Umbraco CMS the command would be:

`dotnet add package Umbraco.TheStarterKit`

Navigating to the NuGet Package Manager in Visual Studio is more visual, and gives you an overview of already installed packages.

![Visual Studio - nuget packages manager](https://3872888104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgEH4FChbCn7eDDqREvdE%2Fuploads%2Fgit-blob-95d91944f82b7c89ed65482941f79d90b9046110%2Fnuget-installing-options.png?alt=media)

The Package Manager has an integrated search function that allows you to find any public NuGet package and install it on the project.

![Visual Studio - finding The Starter Kit](https://3872888104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgEH4FChbCn7eDDqREvdE%2Fuploads%2Fgit-blob-d5e1b3b80a51cbc68d50cac8cadb03eb7f135d71%2Fnuget-package-in-manager.png?alt=media)

Once the package has been installed, it will show up under the **Packages** section in the backoffice, under **Installed** tab.

![Backoffice - installed packages](https://3872888104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgEH4FChbCn7eDDqREvdE%2Fuploads%2Fgit-blob-74651ae2ada6088d39c4a981f9951a2558c13078%2Fbackoffice-installed-packages.png?alt=media)

## Uninstalling packages

Uninstalling packages is not always as straightforward as installing them.

In this section, we will provide two examples of uninstalling a package - the StarterKit package and the SEOChecker package.

### Uninstalling packages like the StarterKit

{% hint style="info" %}
Keep in mind that this particular guide targets a specific package. There are many packages out there, and each one is different. The exact steps presented here might not work the exact same way for all the packages, though the general approach should still apply.
{% endhint %}

The Starter Kit provides you with a boilerplate website solution to build upon. The package installs Document Types, Templates, media, content, and everything else needed to set up a small website. There is little custom code/functionality involved which is usually the case for such starter kit or sample-site packages.

To uninstall a package, either run a command or use the NuGet Package Manager in Visual Studio.

`dotnet remove package Umbraco.TheStarterKit`

![Visual Studio - uninstalling via Package Manager](https://3872888104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgEH4FChbCn7eDDqREvdE%2Fuploads%2Fgit-blob-b63cc056930545ac457bf540403bbac90472dece%2Funinstalling-via-nuget-package-manager.png?alt=media)

It is recommended to clean the solution after removing any package. This can be done by right-clicking the project in Visual Studio and choosing the *Clean* option, or using the `dotnet clean` command.

![Visual Studio - clean solution](https://3872888104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgEH4FChbCn7eDDqREvdE%2Fuploads%2Fgit-blob-435e2505b065bec324bda14b419b98bde6bf9cb8%2Fvs-cleaning-solution.png?alt=media)

#### Removing package leftovers from the backoffice

With packages like the StarterKit, the process does not end there. While the package is gone, content - and everything else needed for the website - is still available in the backoffice. To fully remove this kind of package, additional steps are needed.

<details>

<summary>Remove content provided by the package</summary>

There is no universal way to tell what content comes from a package, and what content is custom-made. In the Content section, delete individual nodes accordingly. If the goal is to fully remove the package and clean the site, all the content can be removed (and the recycle bin emptied).

<img src="https://3872888104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgEH4FChbCn7eDDqREvdE%2Fuploads%2Fgit-blob-3fa0db3b6ade4248ad6eca2ccec56533bd6d30b6%2Fremoving-content.png?alt=media" alt="Backoffice - removing content" data-size="original">

</details>

<details>

<summary>Remove media provided by the package</summary>

Similar to content, media also might have to be removed.

<img src="https://3872888104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgEH4FChbCn7eDDqREvdE%2Fuploads%2Fgit-blob-160ccfac9f626757133c5e7f62dcc79e18b3902c%2Fremoving-media.png?alt=media" alt="Backoffice - removing media" data-size="original">

</details>

<details>

<summary>Remove Document Types</summary>

Document Types can be removed from the **Settings** section. If fully removing the package, all Document Types can be deleted, as there are no default Document Types in a clean-slate Umbraco installation.

<img src="https://3872888104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgEH4FChbCn7eDDqREvdE%2Fuploads%2Fgit-blob-40d0ad2a49dc4902205d46de18e532169959f7d7%2Fremoving-document-types.png?alt=media" alt="Backoffice - removing document types" data-size="original">

</details>

<details>

<summary>Removing Data Types</summary>

As opposed to Document Types, there are some Data Types that are available out of the box when Umbraco is installed. It is not recommended to remove them. The safe approach is to delete any item that starts with a Document Type prefix and includes multiple dashes. That is the default naming convention for new configurations of Data Types (Example: "Blog - How many posts should be shown - Slider")

<img src="https://3872888104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgEH4FChbCn7eDDqREvdE%2Fuploads%2Fgit-blob-7cd36ad62eb0389a2534a0ff02b1f15504d730a9%2Fremoving-datatypes.png?alt=media" alt="Backoffice - removing data types" data-size="original">

</details>

<details>

<summary>Removing Templates</summary>

No Templates are available out of the box in a new installation. If cleaning up after a package, it would be okay to delete all that are present

<img src="https://3872888104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgEH4FChbCn7eDDqREvdE%2Fuploads%2Fgit-blob-08beb8e2c15080b93eb9f23d707d4ac8481b63b7%2Fremoving-templates.png?alt=media" alt="Backoffice - removing templates" data-size="original">

</details>

<details>

<summary>Removing Partial Views</summary>

Out of the box, there are a few views available in the `blocklist` and `grid` folders. Everything else can theoretically be removed.

<img src="https://3872888104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgEH4FChbCn7eDDqREvdE%2Fuploads%2Fgit-blob-1fc93d8ccaa66b1bea6322d24903d837a13f1a96%2Fremoving-partials.png?alt=media&#x26;token=81c438f5-7a7a-4e60-9d47-6de0ad678f79" alt="Backoffice - removing partial views" data-size="original">

</details>

<details>

<summary>Cleaning leftover files on disk</summary>

Some packages might reference other items. For example, installing the StarterKit also adds `Bergmania.OpenStreetMap` to your project. That component will show up as installed in the backoffice even after uninstalling the NuGet package.

<img src="https://3872888104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgEH4FChbCn7eDDqREvdE%2Fuploads%2Fgit-blob-48ee681032083c03d19ae29af292a5293381b095%2Finstalled-package-leftovers-backoffice.png?alt=media" alt="Backoffice - Packages section - leftover dependency" data-size="original">

In many cases, custom dashboards, editors, and scripts are left in the `App_Plugins` folder after a package has been uninstalled via NuGet. These files also have to be deleted manually.

<img src="https://3872888104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgEH4FChbCn7eDDqREvdE%2Fuploads%2Fgit-blob-f69d24e28df3347051cd4dad7565036bfabe7b50%2Fapp-plugins-starterkit.png?alt=media" alt="Visual Studio - App Plugins leftover files" data-size="original">

</details>

### Uninstalling packages like the SEOChecker

{% hint style="info" %}
Keep in mind that this particular guide targets a specific package. There are many packages out there, and each one is different. The exact steps presented here might not work the exact same way for all the packages, though the general approach should still apply.
{% endhint %}

More advanced packages that add functionality on top of Umbraco, usually rely on providing custom, compiled code. That being said, many of such packages also implement custom Sections, Dashboards, editors, and views.

In this example, we will be using the SEOChecker package. This package allows developers of the site to add custom properties to Document Types used to track search engine optimization practices.

An example use case of the SEOChecker property on a Document Type, as presented in the Content section:

![SEOChecker in content](https://3872888104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgEH4FChbCn7eDDqREvdE%2Fuploads%2Fgit-blob-5c83b0d11e64ac92893bdd38a8e3df0d166c4557%2Fseochecker-content-section.png?alt=media)

To uninstall the SEOChecker from a website, the first step is to remove the package via a `dotnet` command or use the NuGet Package Manager.

The following command can be used for uninstalling the package:

`dotnet remove package SEOChecker`

After that, cleaning the solution is recommended.

![Visual Studio - clean solution](https://3872888104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgEH4FChbCn7eDDqREvdE%2Fuploads%2Fgit-blob-435e2505b065bec324bda14b419b98bde6bf9cb8%2Fvs-cleaning-solution.png?alt=media)

<details>

<summary>Cleaning leftover files on disk</summary>

While uninstalling the package would remove most of the custom code, the `App_Plugins` folder has to be cleaned manually.

<img src="https://3872888104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgEH4FChbCn7eDDqREvdE%2Fuploads%2Fgit-blob-b2b2ec0b92c61de8604c1ef3b6253b4f59eda29d%2Fseochecker-app-plugins.png?alt=media" alt="SEOChecker files in App Plugins" data-size="original">

Removing *seochecker* folder from `App_Plugins` will clean up the leftover backoffice section and dashboards.

</details>

## Consequences of removing packages

If content on the website relies on having a custom Property Editor or a data source installed, those properties will default to a `label` Data Type. All previously saved content in the property will in turn be converted to a string.

In the case of the SEOChecker, the custom property added from the package would look like this after all the package files have been removed:

![The SEOChecker in Content after removing the package](https://3872888104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgEH4FChbCn7eDDqREvdE%2Fuploads%2Fgit-blob-9eb77e233095cb3f32571f92c3b656f2a54c0c5a%2Fseochecker-after-removal.png?alt=media)

Depending on the packages and the implementation, rendering of content from custom editors, or any frontend functionality dependent on external code, might not work correctly. It is always recommended to inspect the frontend of the site after removing any packages.
