Skip to content

Uninstall UDM Utilities and Containers

techsolo12 edited this page May 23, 2021 · 5 revisions

SSH into your UDM to perform any of these tasks. Entering the UniFi OS shell is not required until you get to the step of uninstalling the UDM Utilities package.

Stop and Remove Running Containers

List all running containers with the command podman ps. The output will show the UDM's unifi-os container, along with any that you have added. Do not remove the unifi-os* container. Identify the name of the container that you want to uninstall, and run the following commands:

podman ps
podman stop CONTAINER_NAME
podman rm CONTAINER_NAME

Remove Unused Containers' Data Folders

For most containers, you would have created folders for the required data and configuration files. These folders were outlined in the installation steps for any containers that you chose to install. Reference those installation guides to confirm that you are removing the relevant folders after you have removed a container. Take a backup and _then _delete the container's data folder using SSH or WinSCP.

Data Folder Examples:

AdGuard Home:

  • /mnt/data/AdguardHome-Confdir
  • /mnt/data/AdguardHome-Workdir

UDM-LE (Let's Encrypt)

  • /mnt/data/udm-le

NTOPNG

  • /mnt/data/ntopng

Remove Container Images

These are the source images that were downloaded (pulled) to spin up the containers. If you are permanently removing a container that you no longer want to use, then you will want to remove its image as well.

List all container images: podman images
Delete a container image: podman rmi CONTAINER_IMAGE_NAME

Uninstall UDM Utilities

The removal of all UDM Utilities effects is basically the reverse of installing it. Below are the specific steps required.

  1. Follow the documented steps to stop and remove all custom containers except for unifi-os, and then remove the matching container images.
  2. Enter the UnifiOS shell by running unifi-os shell.
  3. Uninstall the package: dpkg -P udm-boot.
  4. Exit the UniFiOS shell: exit.
  5. Remove the /mnt/data/on_boot.d folder and any scripts remaining in it.
  6. Remove in /mnt/data/ the on_boot.sh script.
  7. Optionally, when you installed the CNI plugin remove all folders and its related settings.
  • /mnt/data/.cache/cni-plugins
  • /mnt/data/podman/cni
  • /opt/cni
  • /etc/cni