Symantec Management Platform (Notification Server)

 View Only

Issue: Old, Stale Packages Remain on Package Servers After They Have Been Removed from the Notification Server 

Apr 20, 2009 05:43 PM

When packages that have previously been replicated are removed from the Notification Server, these packages remain on the package server(s) despite them not being active, valid packages.  In environments where packages are retired or replaced with new packages frequently, this could cause an exorbitent amount of wasted space on package servers.

If you look at the Package Delivery folder on the package server (default C:\Program Files\Altiris\Altiris Agent\Package Delivery) and notice a variance in the number of folders compared to the Notification Server's reported packages, then this procedure should help increase available disk space on your package servers.

The below process can help you go from this...
imagebrowser image

to this...
imagebrowser image

Note: I am not a VBScripting guru. I've been able to utilize these scripts in our environment with little to no problems. Please carefully review and test these scripts before implementing in your production environment as I cannot be held responsible for any ill-effects these may cause.

Step 1: Identify which packages are still valid by deleting snapshot.xml files and refreshing packages

  • The first step is to identify which packages are still valid.
  • AKB 1492 discusses the topic of resynchronizing package servers with invalid or stale codebases. The steps outlined in section 2 of this KB will help you determine which packages are still valid.
  • There are two ways to accomplish this: manually or via a VBScript. The manual process is not ideal, especially in environments where there may be several package servers and when it comes to deleting old packages.
  • The attached VBScript (step1.vbs_.txt) does the following:
    -Reads the Altiris Agent installation folder from the registry
    -Creates a log file in the Package Delivery folder
    -Deletes all snapshot.xml files in the folders underneath the Package Delivery folder
    -Logs the instances of snapshot.xml that were deleted
    -Deletes the client policies from the Client Policies folder
    -Updates the client configuration
    -Refreshes the packages, which re-creates the snapshot.xml files
    -Logs the total number of snapshot.xml instances that were deleted
  • During the package refresh, if you were to log into the package server and look at the Package Server tab in the Altiris Agent GUI, you should see the number of available packages decrease as the downloading/pending packages increases. Then, the downloading/pending packages number will decrease and the available packages will increase as the snapshot.xml files are recreated. Once the downloading/pending packages number returns to 0 this step is complete.  Additionally, you can verify by searching the Package Delivery folder tree for snapshot.xml.  The end result should match the number of available packages in the Altiris GUI.
Step 2: Delete all packages which do not contain a snapshot.xml
  • After the snapshot.xml files have been recreated, it should be safe to delete any folder that does not contain a snapshot.xml, as this would be the indicator that it's a package the Notification Server has no knowledge of anymore.
  • Again, VBScript will come to the rescue by scanning through these folders and deleting any folder not containing the snapshot.xml file.  This only looks at the folders immediately under the Package Delivery folder, so you don't need to worry about the cache folders getting deleted.
  • The attached VBScript (step2.vbs_.txt) does the following:
       -Reads the Altiris Agent installation folder from the registry
       -Creates a log file in the Package Delivery folder
       -Steps through the Package Delivery folder's subfolders
       -Checks to see the presence of snapshot.xml in the subfolder
       -If the snapshot.xml files does not exist, the folder is deleted
       -Logs the folder name and disk space the folder used when it is deleted
       -Logs the total number of folders removed and total disk space freed when complete
These VBScripts could be manually executed, or could be scheduled through Software Delivery, Deployment Server, Windows Scheduled Tasks, or any other suitable means. You will just want to make sure that the Package Server has enough time to refresh packages before executing the second VBScript, as you may accidentally wind up deleting valid packages.

One issue I found is that if a site contains more than one package server, you do not want to run the snapshot refresh script on all of the package servers simultaneously. The package servers will continually try to re-download the missing snapshot.xml's from one another. To avoid this, it may be best to schedule these refreshes to occur at different days, or at least different times.

Statistics
0 Favorited
0 Views
2 Files
0 Shares
1 Downloads
Attachment(s)
txt file
step1.vbs_.txt   2 KB   1 version
Uploaded - Feb 25, 2020
txt file
step2.vbs_.txt   1 KB   1 version
Uploaded - Feb 25, 2020

Tags and Keywords

Comments

May 02, 2018 12:49 PM

Try this:

 

https://support.symantec.com/en_US/article.HOWTO38239.html

 

 

Mar 09, 2018 10:22 AM

im currently running into the same issue.

I am noticing if I delete say office 2007 policies and SW... run package refresh, check package server in... that I notice the package drop from the package server agent window; however, the folder remains behind on the server. We are out of space and I am going through trying to free up space. I went to manually delete it and it states I do not have rights. Logged into the box with the Altiris credentials and it too does not.


​any thoughts or ideas on this?
​for patches I followed the doc... disable patch policies, let them sit for a few days, delete them. go into patch management console and right click patches and choose disable. Next morning after everything runs, seems to have gotten rid of them...

​just SWD isnt being removed.

Jun 11, 2016 11:36 AM

You mean we need to deploy this script via Altiris Console to Package Server .

Jan 06, 2016 09:27 PM

Hi the script u will need to deploy it from Altiris Console to the intended client machine in order for it to be works.

 

If you use try to run it with command prompt it will get run and return you with error code.

Oct 31, 2013 11:09 AM

I am currently on 7.5.  I am running out of space on my package servers, I do have them set to remove unused packages after 1 month but that doesn't seem to make a difference.   The other day I got rid of some large packages like old versions of office, however they remain on the package servers.   When I tried to run the above VBScripts each one fails.  The first one with a error at line 48 character 3 and the 2nd one at line 1 character 1.   Both look to my untrained eye to be fine.   Anyone have any ideas on how to get them to work? 

Jun 02, 2009 10:38 PM

Nice work!  I'm going to have to look at modifying this.  We replicate many of our packages to a destination folder on the PS (i.e. \\%COMPUTERNAME%\Software$\Vendor\Application\Version\) and this has the same problem of orphaned packages.  Also it is a good idea to go in and check the Package Server purging settings; you can set how long to keep deleted packages.  Maybe yours has been turned off, or you are also using a custom destination (which again prevents the package from being deleted).

Jun 02, 2009 11:13 AM

Thanks for the help!!!!!!!!

Apr 21, 2009 08:48 PM

thank you for sharing this with us.

Thanks,
Eshwar

Apr 21, 2009 01:42 PM

This is awesome!  I thought that package servers would be smart enough to clean themselves up since the client does, but apparently not.  We're going to implement this asap!

Thanks!!!

Related Entries and Links

No Related Resource entered.