Hello,
we have packages that update regularly, unfortunately this generates many versions on the server.
Is it possible to clean them up, keeping a minimum number of versions and thus automatically freeing up disk space?
Regards
Cleaning old version package
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
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
- sfonteneau
- WAPT Expert
- Messages: 2363
- Registered: July 10, 2014 - 11:52 PM
- Contact :
Hello
, you can right-click in the private repository and you will see "Select obsolete packages".
You can then modify the selection or delete them directly.
, you can right-click in the private repository and you will see "Select obsolete packages".
You can then modify the selection or delete them directly.
-
Kevin-LH76
- Messages: 23
- Registration: February 8, 2026 - 5:57 PM
Hello,
the goal would be to automate it and avoid having to do it manually.
Regards.
the goal would be to automate it and avoid having to do it manually.
Regards.
- sfonteneau
- WAPT Expert
- Messages: 2363
- Registered: July 10, 2014 - 11:52 PM
- Contact :
Hello,
we hadn't planned for that. A dedicated script would be needed.
we hadn't planned for that. A dedicated script would be needed.
-
Kevin-LH76
- Messages: 23
- Registration: February 8, 2026 - 5:57 PM
We have an auto_update_package script; is there a command via wapt-get to perform this action?
- sfonteneau
- WAPT Expert
- Messages: 2363
- Registered: July 10, 2014 - 11:52 PM
- Contact :
No, none. The command was deemed too dangerous and was not implemented.
Use this script as a guide to identify the latest version of each available package:
https://github.com/comitari/wapt-packag ... r/setup.py
The removal process is as follows:
List all packages.
Identify the latest version of each package present in the repository for each machine. (The code already does this.)
Remove all packages not in the previously calculated list
. Delete using https://www.wapt.fr/fr/doc/wapt-api.htm ... ges-delete
Use this script as a guide to identify the latest version of each available package:
https://github.com/comitari/wapt-packag ... r/setup.py
The removal process is as follows:
List all packages.
Identify the latest version of each package present in the repository for each machine. (The code already does this.)
Remove all packages not in the previously calculated list
. Delete using https://www.wapt.fr/fr/doc/wapt-api.htm ... ges-delete
-
Kevin-LH76
- Messages: 23
- Registration: February 8, 2026 - 5:57 PM
I'll take a look at that, thanks
-
Kevin-LH76
- Messages: 23
- Registration: February 8, 2026 - 5:57 PM
Hello,
with the help of your message and documentation, I retrieved the list of packages and their current versions.
However, I'm having trouble finding all the versions of a package in order to remove the one that differs from the current version.
with the help of your message and documentation, I retrieved the list of packages and their current versions.
However, I'm having trouble finding all the versions of a package in order to remove the one that differs from the current version.
-
Kevin-LH76
- Messages: 23
- Registration: February 8, 2026 - 5:57 PM
I tried to retrieve the list via the API with the following request:
The options do not seem to work with the Package resource, whereas I have no problem with the Hosts resource.
I tried testing with the reporting tab of the console and it works very well.
Code: Select all
/api/v3/packages?filter=package:tcfpkg-microsoft-defender-antivirus-definition-update&reachable=1&columns=package,id,version&limit=2000I tried testing with the reporting tab of the console and it works very well.
Code: Select all
SELECT package, name , version , id from packages where package = 'tcfpkg-microsoft-defender-antivirus-definition-update' and version <> '1.457.304.0-312'- sfonteneau
- WAPT Expert
- Messages: 2363
- Registered: July 10, 2014 - 11:52 PM
- Contact :
You have to go through /packages as it is done in the code I gave previously, it is much cleaner because it is the real data.
