If you use the print queue manager, then you should consider for how long, that you want to keep the print outs.
This can be setup via the tenant settings under PrinterQueue in the Others category:
Here you can set the retention periods as below:
The parameters are:
Delete successful prints older than
State for how long the successful print outs (print data files) should be kept.
Delete failed prints older than
State for how long the failed print outs (print data files) should be kept.
Delete Log messages older than
State for how long the log messages should be kept.
Maximum number of prints to keep
As a combination with the above you can also set a limit for how many print files that should be kept in total. If this limit is hit, then the oldest print files will be deleted to keep within this limit (independent of the status).