As we faced some disk space issues in our project, we want to clean up certain directories. To do this, I've looked at the directories on the system and their purpose. Not all directories I see on the system are mentioned in the help article. An example of a directory we want to clean is the ...cache/StaticContent/global/ServiceExport as it contains the imported zip-files (which are formally stored in another repository).
My main questions are:
- Is it advisable to remove files in the temp directories at all?
- If so, which directories can be cleaned? I've made an initial assessment in the table attached.
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
It depends on the usecase that you have, it is not always required to delete the entire temp directory as there can be consequences some times.
In case if you want to reassemble all class files you can delete Pega Extract marker txt file and restart the server.
For other directories like PRGenClasses, PRGenJava, if you delete these two and restart the server will populate the same directories again. There is one more folder called PRGenBackup is available which takes backup of older versions of generated files in PRGenJava and PRGenClasses directories.
For directories like PassivationData and PegaSearchIndex, deleting them will be risky if you are using File based passivation or have already built the indexes for search.
Posted: 6 years ago
Posted: 28 Nov 2016 9:39 EST
Paul Gentile (PaulGentile_GCS)
Principal Engineer, Technical Support, 1:1 Customer Engagement
In theory, the entire temp directory contents can be deleted if server is stopped. Wiping out the temp directory contents is typically overkill - and is not recommended when you're just cleaning up the file system. The help file you reference stipulates "Do not delete the temporary files directory". This is the directory location itself defined by "explicitTempDir". This should never be deleted.
As you address disk space usage, you should rely on SystemCleaner to maintain this PegaTEMP directory. This will clear old data that is not needed as well as historical data that is outside a "normal" time period (configurable with various settings). SystemCleaner will also take care of the logs stored elsewhere.
late response but as I remember the SystemCleaner didn't do his work (and the agent was enabled). One of the things we saw is that the passivation data was not cleaned up (many many old sessions). We now schedule a clean-up of the ServiceExport directory weekly to clean up non-recent product files, this already helped out.