With the release of Microsoft’s Creators Update (1703) new features have been added to App-V. These new features are summarized on this page. One of the new functionalities is the automatically cleanup unpublished packages and in this blog post, I will cover the new cleanup functionality.

What is the advantage of auto cleanup?

In previous versions of App-V, once an App-V package is unpublished the content still exists on the disk. To free up additional space you need to manually remove the unpublished package. When managing a large environment this can result can be a hassle. With the new update of Windows 10 (build 1703) App-V automatically cleanup unpublished packages. Once the package is unpublished the content will be removed from the disk. This way you free up additional storage and no packages are left behind.

How do you enable auto cleanup?

There are multiple ways to configure the auto cleanup.

PowerShell

Group policy

Registry

Within PowerShell, the following command can be used to enable or disable the feature. Enable:

Set-AppvClientConfiguration -AutoCleanupEnabled 1

Disable:

Set-AppvClientConfiguration -AutoCleanupEnabled 0

You can verify the configuration using the command below.

Get-AppvClientConfiguration

When managing a larger environment with multiple clients you may want to switch to Group Policy. You can find the cleanup feature in the following location.

“Administrative Templates\System\App-V\PackageManagement\Enable automatic cleanup of unused appv packages setting.”

Note: for some reason, this feature is not yet included in the Microsoft Desktop Optimization Pack Group Policy Administrative Templates.

Finally, there is also the possibility to enable or disable it by the registry.

“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AppV\Client\PackageManagement\AutoCleanupEnabled”

When are the packages removed?

Once the package is unpublished the App-V package will be removed. The following screenshot is taken before the package is unpublished.

After unpublishing the package the directory is empty.

As you can see the directory still exists in the App-V folder but the version has been removed. It’s important to know when a package is still published to another user on the same client the package will not be removed. This makes sense otherwise the other user cannot start the App-V application anymore.

Conclusion

Microsoft is adding new functionalities to App-V using the major builds of Windows. With the Creators Update, multiple features are added including the auto cleanup. This auto cleanup may be a small feature it can really help free up storage when unpublishing packages from a client. I hope this was useful and if you have any comments or question please leave them below.

Credit featured image: Catt Liu