How to Clean Up Expired Tanzu Licenses in vCenter Using CLI

by Apr 7, 2025vSphere With Tanzu

If you’ve ever enabled Workload Management in vSphere with Tanzu and later removed the Supervisor Cluster, you might find yourself stuck with an expired Tanzu license that refuses to go away. The vSphere GUI doesn’t allow removal of licenses still assigned to assets—even if those assets no longer exist.

This guide walks you through how to clean up Tanzu licenses using CLI, without relying on external tools like JXplorer.

I wouldn’t write this blog post if it were merely a copy and paste from a Knowledge Base article. Anyway, the Broadcom KB article mentions two options :

  1. use JXplorer – I didn’t want to go download and just work through the solution via CLI
  2. CLI

We are going to focus on how to do this from the CLI !

Let’s visualize how the problem looks, this is my view from vCenter:

Tanzu license assigned to the Supervisor cluster

It is standard behavior that licenses assigned to an Asset, are not available for removal. Because it is Expired, it is just ugly showing there within the overview of my added licenses. I want to get rid of it, but how do I do that?

As mentioned in the Broadcom KB article, one can browse the LDAP database, and throw it out.

Why This Happens

When a Tanzu license is assigned to a Supervisor Cluster, it becomes tied to that asset. Even after the cluster is deleted, the license remains assigned and cannot be removed via the GUI. It’s purely aesthetic—but annoying.

Step-by-Step: Remove Tanzu License via CLI

1. Search the LDAP Database

Use the following command to locate the asset and license entries:
Piping it to ‘less’ will give the option to search (type /) through the content. You’ll need it as it returns a lot of values

/opt/likewise/bin/ldapsearch -h localhost \
-D "cn=Administrator,cn=Users,dc=vsphere,dc=local" \
-w 'INSERT_PASSWORD' \
-b "cn=LicenseService,cn=Services,dc=vsphere,dc=local"| less
ShellSession

Search for keywords like Asset, Tanzu, or wcp.

2. Delete the Asset Assignment

Once you find the asset entity (e.g., AssetEntity_wcp-domain-...), delete it:

/opt/likewise/bin/ldapdelete -h localhost \
-D "cn=Administrator,cn=Users,dc=vsphere,dc=local" \
-w 'INSERT_PASSWORD' \
"cn=AssetEntity_wcp-domain-c7-a76334a1-f4fd-4636-a466-e4c753d990ee,cn=LicenseService,cn=services,dc=vsphere,dc=local"
ShellSession

Revisit the Assets view. We see that the license is not assigned to the supervisor cluster anymore.

The license is not assigned to the supervisor cluster anymore!
Cleaning the Tanzu license assigned to the Supervisor cluster

When we go and review the Licenses view, we can see that the license is still present, and assigned. I didn’t restart the vCenter vpxd service at this point. If I would have, the license would have probably been available for removal.

3. Delete the License Entry

Search for the license key and locate the license entity (e.g., LicenseEntity_...):

/opt/likewise/bin/ldapdelete -h localhost \
-D "cn=Administrator,cn=Users,dc=vsphere,dc=local" \
-w 'INSERT_PASSWORD' \
"cn=LicenseEntity_b056d2ce-b035-42f4-8733-b5d21c094121,cn=LicenseService,cn=services,dc=vsphere,dc=local"
ShellSession

4. Restart vCenter Service

To refresh the license view:

service-control --restart vpxd
ShellSession

Result

After restarting, the expired Tanzu license will no longer appear in your vCenter license overview.

Tanzu licence cleaned