macOS stores a copy of everything one prints forever [video](youtube.com)
youtube.com
macOS stores a copy of everything one prints forever [video]
https://www.youtube.com/watch?v=eAgfeVNKdoo
4 comments
[deleted]
Why does macOS behave this way?
What is supposed to happen to the /spool folder contents once printing is complete?
What is supposed to happen to the /spool folder contents once printing is complete?
> Why does macOS behave this way?
I would guess it's because PreserveJobHistory in cupsd.conf defaults to 500.
I would guess it's because PreserveJobHistory in cupsd.conf defaults to 500.
On MacOS Ventura, /etc/cups/cupsd.conf does not specify any values for PreserveJobHistory or PreserveJobFiles.
I would expect the default values documented in cupsd.conf(5) to be the compiled-in defaults.
If not then there's a serious bug in Apple's bundled version of cups and they need to update!
If not then there's a serious bug in Apple's bundled version of cups and they need to update!
if you run linux go check your /var/spool/cups folder also
I haven't printed from Linux since college.. many moons ago. Nowadays I use it mainly for servers >..<
A good case can be made for printers being one of the most annoying, finicky, and error prone aspects of computing.
A good case can be made for printers being one of the most annoying, finicky, and error prone aspects of computing.
Is there any evidence this is true?
I just checked my /var/spool/cups, and it contains PDF:s of prints going back to about February 2022.
This computer is about eight years old and has been through I-don't-know-how-many OS updates. This, and the fact that not everyone has these files, makes me suspect that there is supposed to be some mechanism cleaning these files up, but that the details have changed over time, and some OS update got it wrong.
This computer is about eight years old and has been through I-don't-know-how-many OS updates. This, and the fact that not everyone has these files, makes me suspect that there is supposed to be some mechanism cleaning these files up, but that the details have changed over time, and some OS update got it wrong.
These would be metadata about completed print jobs. The PreserveJobHistory* options in cupsd.conf[0] control retention of this information; the default value is 500, so most users who print occasionally will likely have entries going back a couple of years.
You can view (some) of it with: 'lpstat -W completed'; add '-l' for more detail. Add '-u USER' to view completed print jobs of another user (there doesn't seem to be any way to see _all_ user info, cups' command line tools always seem to have aggravating shortcomings like this...)
[0] https://www.cups.org/doc/man-cupsd.conf.html
You can view (some) of it with: 'lpstat -W completed'; add '-l' for more detail. Add '-u USER' to view completed print jobs of another user (there doesn't seem to be any way to see _all_ user info, cups' command line tools always seem to have aggravating shortcomings like this...)
[0] https://www.cups.org/doc/man-cupsd.conf.html
To be clear: It was not just metadata, it was actual PDF:s — I tried opening several of them — named d<digits>-<digits>. But, as I said, after an OS update (to 11.7.1) (including a reboot, obviously), they were gone, and only metadata files (named c<digits>) remain.
Very interesting. That certainly sounds like PreserveJobFiles was set to 'yes' or a stupidly high number. And it sounds like, as you say, a subsequent OS update changed it to a sensible setting.
FYI the default value is 24 hours so it might be interesting for you to print something now, see if the job file (starting with d, I guess this is sort for 'document') is preserved after the print job completes, and then check a couple of days later to see if it's been removed by cups.
[subsequent edit] Maybe you ran into https://github.com/apple/cups/issues/5747, "You really need to use a current release of CUPS. I suspect this is due to a known bug that was fixed a long time ago" - maybe that bug shipped with an older version of macOS and that explains what people are seeing.
FYI the default value is 24 hours so it might be interesting for you to print something now, see if the job file (starting with d, I guess this is sort for 'document') is preserved after the print job completes, and then check a couple of days later to see if it's been removed by cups.
[subsequent edit] Maybe you ran into https://github.com/apple/cups/issues/5747, "You really need to use a current release of CUPS. I suspect this is due to a known bug that was fixed a long time ago" - maybe that bug shipped with an older version of macOS and that explains what people are seeing.
I noticed that there was an update to Big Sur — the newest OS that this machine can run — which I had missed, so I installed it, and the files went away!
I also noticed that there has been issues, like https://github.com/apple/cups/issues/5538, related to spool file clean-up. (The fix to that one leaves some decidedly fishy-looking parentheses, but they were fixed in a later commit.)
I also noticed that there has been issues, like https://github.com/apple/cups/issues/5538, related to spool file clean-up. (The fix to that one leaves some decidedly fishy-looking parentheses, but they were fixed in a later commit.)
According to cupsd.conf(5), the default setting for PreserveJobFiles is 86400, so printed documents are only preserved for 24 hours. Paranoid users can set this to "no" to cause them to be removed immediately after printing.
I'm skeptical of the claim that that job files are preserved "forever" unless CUPS has been configured thus.
I'm skeptical of the claim that that job files are preserved "forever" unless CUPS has been configured thus.
... or unless Apple shipped a buggy version of CUPS: https://github.com/apple/cups/issues/5747
Also, I keep seeing this claim repeated during the last week or so... what gives?
I wonder if this is all based solely on a rather breathless (and now deleted) reddit post from 9 days ago? https://www.reddit.com/r/YouShouldKnow/comments/yhftqo/ysk_m...
People in a different subreddit were less convinced:
https://www.reddit.com/r/macsysadmin/comments/yho0cf/ysk_mac...