Page 1 of 1

[RESOLVED] Wapt-Clean

Published: February 13, 2026 - 09:08
by guigeek
Hello everyone!
I'm on version 2.6.1.17705-80 on the agents, and after a disk space issue on some machines, I've noticed that the `wapt-get clean` command doesn't delete the MSU files related to Microsoft updates located in C:\Program Files (x86)\wapt\private\cache.
Is this normal?
Is there another way to delete these files?
Thanks and have a good day,
Guillaume

Re: Wapt-Clean

Published: March 12, 2026 - 10:15
by guigeek
Person ?

Re: Wapt-Clean

Published: March 12, 2026 - 5:13 PM
by kcherel
Hello guigeek,

You can try using this script to delete the files located in C:\Program Files (x86)\wapt\cache and C:\Program Files (x86)\wapt\private\cache

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *

def install():

    print("Nettoyage du repertoire C:\Program Files (x86)\wapt\private\cache")
    WAPT.cleanup(obsolete_only=False)

    cache_dir = makepath(WAPT.wapt_base_dir, 'cache')
    print("Nettoyage du repertoire /private/cache")

    if isdir(cache_dir):
        print('Suppression des données dans C:\\Program Files (x86)\\wapt\\cache (sauf icons)')
        for item in os.listdir(cache_dir):
            if item.lower() == 'icons':
                continue

            item_path = makepath(cache_dir, item)
            try:
                if isdir(item_path):
                    remove_tree(item_path)
                elif isfile(item_path):
                    remove_file(item_path)
            except Exception as e:
                print(f"[INFO] Impossible de supprimer {item_path} (ignoré) : {e}") 
If you want to clean up the various binaries in the Windows Update cache (C:\Windows\SoftwareDistribution), you can also deploy the "tis-clean-softwaredistribution" package.

Sincerely,
Kevin.

Re: Wapt-Clean

Published: March 12, 2026 - 5:39 PM
by dcardon
@guigeek

The files should be deleted from this directory after installation. But there must be a bug somewhere...

Hubert, Simon, and I took a quick look a few weeks ago, and there seems to be a problem with the fact that after installation, the status isn't UPTODATE but rather NEED_REBOOT. Therefore, the engine has to wait for confirmation after a reboot that everything is OK, but after a reboot, the next scan and the status change, for some reason, don't seem to clean things up... We're investigating.

In the meantime, you can push the code suggested by Kevin to free up space while waiting for a fix.

Also, if you have peercache enabled, the file is probably also in the peercache cache, so that wastes twice as much space... To be continued.

Best regards,

Denis

Re: Wapt-Clean

Published: March 13, 2026 - 3:24 PM
by guigeek
Thank you for these answers!