Question
What does the “Delete Package files if they are unused for" on the Package Server setting do?
(under Settings>Notification Server>Site Server Settings>Site Management>Site Server Settings>Package Service>Package Service Settings)
ITMS 8.x
Answer
This setting is designed to be used when Package Servers should delete unused packages. It exists on the Settings tab of the Package Server page. Once checked, an order of events must occur for packages to be deleted.
C:\Program Files\Altiris\Altiris Agent\Package Server Agent\Package Status
Site/Package Server Clean-up: Allow for the NS.Package Refresh and NS.Package Distribution Point Update Schedule tasks to run on the SMP Server (generally scheduled through the night), for those processes will clear the Software Delivery Package codebases from the SMP in the SQL database and the Site/Package Servers will clean-up any packages when synchronized with the SMP Server.
Note: The NS.Package Refresh, NS.Package Distribution Point Update Schedule scheduled tasks can be manually executed from the SMP Server:
For Server 2012 and later: Server Manager > Tools > Task Scheduler > Task Scheduler Library
.
Process:
Entry 2:
Marking package id: {1EC214B8-E862-44A9-B3A6-27D918D136A2} as deleted.
-----------------------------------------------------------------------------------------------------
Date: 21/09/2021 01:23:58 p.m., Tick Count: 1918530156 (22.04:55:30.1560000), Size: 317 B
Process: AeXNSAgent.exe (2684), Thread ID: 2288, Module: AeXNSCPackageServer.dll
Priority: 4, Source: Package Server Agent
2. A countdown to remove package files on a Package Server will only begin when either of the following occurs:
Both of these situations result in the package no longer being sent down to the Altiris Agent in the Package Server node of the configuration XML file.
3. Once this occurs, the Package Server updates the PackageStatus.xml file that it stores for each individual package and sets the Status flag to "Deleted", and the Time flag to that time, when it was removed from the configuration file.
By default, the package status files are located at the following location on the Package Server computer under the specific package GUID:
<installeddrive>:\Program Files\Altiris\Altiris Agent\Package Server Agent\Package Status
At each Package Server configuration refresh, the Package Server will check for a Deleted flag inside all the Package Status files and if the corresponding Time flag value has exceeded or “gone past” the duration configured for the deletion of unused packages, then the package files will be removed.
Here is an example of how this PackageStatus.xml looks:
<?xml version="1.0"?>
-<PackageStatus>
<Package IsExternalPSOwner="false" PreviousVirtualDirPath="pkggroup_{d9e2c024-f8c8-463e-a9bd-eea4e838223f}/{1EC214B8-E862-44A9-B3A6-27D918D136A2}/cache" VirtualDirPath="pkggroup_{d9e2c024-f8c8-463e-a9bd-eea4e838223f}/{1EC214B8-E862-44A9-B3A6-27D918D136A2}/cache" LocalManagedLocation="" IsLocalManaged="false" CustomPath="" IsCustomLocation="false" SharePath="" ShareName="PkgSvrHostE$" Size="1727056" Version="1.0" Originator="NS" Time="2021-09-21 13:23:58" PreviousStatus="Ready" Status="Deleted" Policy="{F85FE5D9-005A-40AC-B213-944B496405FE}" NfySvr="<NSserver>.<DomainName>" Name="<PackageName>" Id="{1EC214B8-E862-44A9-B3A6-27D918D136A2}"/>
</PackageStatus>
4. For SMP Server Internal packages, such as the Altiris Agent (Symantec Management Agent), and others, there are no different or unique parameters that cause the countdown or deletion to change in any way. SMP Server internal packages are getting deleted the same as other packages.
One point to note is that, for example, if packages are configured to delete immediately, the deletion does not happen at the exact time the package is removed from the config file. The removal occurs at the next interval of the package refresh schedule on the Package Server. To quicken this process, click the Refresh Packages button inside the Package Server UI.
2023-10-04 Changed company name designations to NfySvr="<NSserver>.<DomainName>" Name="<PackageName>"