none
How to Get Rid of Old files from Themesettings folder which occupied huge space (100+) RRS feed

  • Question

  • still in POC. for One test user, i have noticed,his theme settings folder is around 90MB with many .pkgdat folders and total settings folder is 100+. ( so far,i have been testing with default applications like ms office,IE and desktop settings)

    Out of these files from themesettings folder,many of them are old and there is only one with current date. If this is going to happen for all the users in environment,we can easily expect 100+mb for each user ,so there storage would be 100+mb*number of employees

    How dirty is the size of the disk is going to be ?

    Is there any method to remove the old files from  themesettings folder which are not used anymore and reduce the size for UE-V users on the shared folder ?

    As per the Microsoft document (http://technet.microsoft.com/en-us/library/dn458919.aspx) (permissions to settings storage location),no one will have access to ue-v users folders even Creator owner cannot see the size.So in this case,there is no possibility to run the script on user settings folders to remove the files from themesettings that are older than month ago or so ?

    What others doing for this case ?



    Eswar Koneti | Configmgr blog: www.eskonr.com | Linkedin: Eswar Koneti | Twitter: Eskonr

    Thursday, June 12, 2014 8:32 AM

All replies

  • PowerShell is your friend here -

    There may be a ton of files that are old, but that doesn't mean that they are not being used.  It just means that they haven't been changed in the users profile for quite some time.  Ue-V will not update a file timestamp if nothing changed.

    How can you determine if the files are in use? 

    Export-UevPackage .\ThemeSettings.pkgx > out c:\temp\themeSettings.xml

    This will create an xml document will everything that is captured by ThemeSettings in this case.  (Choose your appropriate .pkgx file).

    in the output you will see references to each pkgdat file in the XML-

    <sysparam>
    
    <Setting Action="Update" Name="sysparam://DeskWallpaper" Type="VT_FILE">68D0283A-6AE2-459C-8CA6-9E84950ECD73.pkgdat</Setting>
    
    <Setting Action="Update" Name="sysparam://DesktopColor" Type="VT_DWORD">0</Setting>
    
    </sysparam>

    If the pkgdat file isn't referenced in this XML you can safely delete it.  You can modify the permissions on the folder to give some service account access and then script up some PowerShell to eradicate any non-referenced files.  In fact, upon inspection of my environment I am seeing build up of old unreferenced files, I think I will create this script and post it in the gallery.  I will update this thread if/when complete.


    • Edited by Fred_Bainbridge Monday, November 3, 2014 8:54 PM format xml change
    Monday, November 3, 2014 8:53 PM
  • Hi,

    Did anyone create this script to remove old pkgdat files? We are getting lots of old pkgdat files left behind for the DeskWallpaper setting so they are capturing the desktop background and then taking up a lot of space on the server. Also is there a way to override the default Microsoft template themesettings2013 to stop it capturing DeskWallpaper?

    And why are old pkgdat files left behind. Surely this is a bug and UEV service should tidy up old ones itself rather than admins have to run a script to clean up after it!

    Thanks,

    Nigel

    Tuesday, March 19, 2019 2:04 PM