First of all, SSIS Catalog keeps SSIS project level versions, not the package level.
(1) It is possible to increase default value (10 by default) of stored versions of SSIS projects. This way you don't need to delete anything. Please see a screen shot below.
(2) SSIS project versions are housed in the SSISDB database, internal.object_versions table.
- You can delete SSIS project versions from that table at your own risk.
- There is a dedicated stored procedure to do exactly that:
[internal].[cleanup_server_project_version]
So you can use its source code as a starting point for your needs.
Just to see it:
USE SSISDB;
GO
-- to see SSIS projects
SELECT * FROM internal.projects;
-- to see SSIS projects versions
SELECT * FROM internal.object_versions;
Useful link: ssis-catalog-project-versioning