Cleaning old version package

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Kevin-LH76
Messages: 23
Registration: February 8, 2026 - 5:57 PM

August 24, 2026 - 1:21 PM

But this doesn't return all versions, only the current one?

The goal would be to retrieve all versions in order to browse through them and delete any that differ from the current one using your last link.
User avatar
sfonteneau
WAPT Expert
Messages: 2363
Registered: July 10, 2014 - 11:52 PM
Contact :

August 24, 2026 - 5:14 PM

This:

https://github.com/comitari/wapt-packag ... tup.py#L71

returns all packages

. And the local_package_list dictionary returns all the latest versions of packages for each host capability.

Basically, anything that doesn't appear in local_package_list but appears above it should be removed.
Kevin-LH76
Messages: 23
Registration: February 8, 2026 - 5:57 PM

August 24, 2026 - 5:59 PM

`store_localstore = localstore.packages()` simply returns the latest version of the package from the repository, but how to say..
I'm deleting the different versions

Example: microsoft-defender-antivirus-definition-update is version - 1.457.318.0-320

store_localstore = localstore.packages() returns a line with version 1.457.318.0-320, whereas in the database there are 929 lines for this package.

How can I either delete all the different versions or at least the lists to remove them using `delete package`?

Because in your documentation, package delete requires a specific version
Removes a package of a specific version. The request must be a list []. It can take multiple packages separated by commas, .

Example:

wapt-get server-request /api/v3/packages_delete --method=POST --data="['ht-wapt-debian-gui_2.6.0.16977-2_0fce3ca2b61ebdbdc9b4b065cfe87176_PROD.wapt']" -c /opt/wapt/wapt-get.ini --wapt-server-user=user --wapt-server-passwd=password
Answer