Del via


Uninstall Connected Cache software from a host machine

This article describes how to uninstall Microsoft Connected Cache for Enterprise and Education caching software from a host machine. These steps should be taken after deleting the cache node in the Azure portal.

Steps to uninstall Connected Cache from a Windows host machine

  1. Launch a PowerShell window as administrator and navigate to the directory returned by $(deliveryoptimization-cli mcc-get-scripts-path).

  2. Run the uninstallmcconwsl.ps1 script, passing in the runtime account credentials you designated during cache node deployment.

    For Local User Accounts:

    .\uninstallmcconwsl.ps1 -mccLocalAccountCredential $myLocalAccountCredential
    

    For Group Managed Service Accounts:

    .\uninstallmcconwsl.ps1 -RunTimeAccountName "DOMAIN\ServiceAccountName$"
    

This script will remove the Connected Cache container, IoT Edge, and all related components from the host machine. To avoid impact to non Connected Cache workloads, don't deploy Connected Cache to host machines with any Azure IoT Edge modules already installed.

This will also unregister the Connected Cache application from the host machine, stopping it from receiving further updates.

Uninstall the Connected Cache application

To completely uninstall the Connected Cache application, run the following command in an elevated PowerShell window.

Get-AppxPackage -AllUsers Microsoft.DeliveryOptimization | Remove-AppxPackage -AllUsers

This command removes the Connected Cache application and Connected Cache install scripts for all users on the host machine.

Steps to uninstall Connected Cache from a Linux host machine

The uninstallmcc.sh script within the deployment package uninstalls the Connected Cache caching software and all related components, including:

  • IoT Edge
  • IoT Edge Agent
  • IoT Edge Hub
  • Connected Cache container
  • Moby CLI
  • Moby engine

To avoid impact to non Connected Cache workloads, don't deploy Connected Cache to host machines with any Azure IoT Edge modules already installed.

Uninstall Public Preview cache nodes (migration to GA)

If your cache node was deployed during the Connected Cache Public Preview (before the GA release on July 23, 2025), the uninstall process differs slightly because Public Preview nodes used a different installation mechanism.

Tip

You can confirm whether a cache node was deployed during Public Preview by checking the Migrated column in the Cache Nodes section of the Azure portal. A value of No indicates the cache node was deployed during Public Preview and has not yet been migrated to the GA release. For more information, see GA migration status.

Uninstall a Public Preview cache node from a Windows host machine

Public Preview deployments on Windows placed installation scripts in the MccScripts subfolder of the installation directory specified in the original deployment command (C:\mccwsl01\MccScripts by default).

  1. Launch a PowerShell window as administrator and navigate to the MccScripts subfolder of the installation directory used during the original Public Preview deployment. If you used the default installation path, run:

    cd C:\mccwsl01\MccScripts
    
  2. Run the uninstallmcconwsl.ps1 script, passing in the runtime account credentials you designated during cache node deployment.

    For Local User Accounts:

    .\uninstallmcconwsl.ps1 -mccLocalAccountCredential $myLocalAccountCredential
    

    For Group Managed Service Accounts:

    .\uninstallmcconwsl.ps1 -RunTimeAccountName "DOMAIN\ServiceAccountName$"
    

This script removes the Connected Cache container, IoT Edge, and all related components from the host machine.

Note

Because Public Preview deployments on Windows don't use the Connected Cache Windows application, you don't need to remove an AppxPackage after running the uninstall script.

Uninstall a Public Preview cache node from a Linux host machine

Public Preview deployments on Linux used the same uninstallmcc.sh script included in the deployment package. Run the uninstall script from the directory where the original deployment package was extracted.

After uninstalling your Public Preview cache nodes, redeploy them using the latest installer to complete the migration to the GA release: