Installing and Uninstalling Packages
The process of installing and, in turn, uninstalling packages in your Umbraco CMS website depends on the version and package type.
This article will cover the process of installing as well as uninstalling packages from your Umbraco CMS website.
As the article will cover both NuGet packages and zip file packages, it is important to know the distinction:
NuGet packages: Modern Umbraco (Umbraco 10+) and Legacy Umbraco (Umbraco 8 and earlier versions).
Package zip files: Legacy Umbraco (Umbraco 8 and earlier versions) only.
Learn more about the different types of packages in the Types of packages article.
Installing packages
In the Umbraco Backoffice, you will find a Packages section that displays the Umbraco Marketplace. From here you can browse all community-made as well as official Umbraco packages for the Umbraco CMS.
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.
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.
The Package Manager has an integrated search function that allows you to find any public NuGet package and install it on the project.
Once the package has been installed, it will show up under the Packages section in the backoffice, under Installed tab.
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
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.
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
If you are using Umbraco 8 or an earlier version you uninstall the packages directly from the Packages section of the Umbraco backoffice.
Navigate to the Installed tab in the Packages section.
Click Uninstall package next to the package you want to uninstall.
Confirm that action by checking Confirm package uninstall.
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.
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.
Uninstalling packages like the SEOChecker
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.
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:
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.
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:
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.
Last updated