EpisodesPrivacy guidesStories
Don’t lose your

Updated on GitHub 4 months ago (see history)

How to disable CUPS printer job history on macOS

macOS stores a copy of everything one prints forever


  • Computer running macOS Monterey or Ventura

Setup guide

Step 1: clear job history

Heads-up: purges /var/spool/cups.

$ cancel -a -x

Step 2: create /usr/local/sbin directory

sudo mkdir -p /usr/local/sbin
sudo chown ${USER}:admin /usr/local/sbin

Step 3: create script

cat << "EOF" > /usr/local/sbin/
#! /bin/sh
set -e
if grep -qe '^PreserveJobHistory Off$' /etc/cups/cupsd.conf; then
exit 0
echo "PreserveJobHistory Off" | sudo tee -a /etc/cups/cupsd.conf
sudo launchctl unload /System/Library/LaunchDaemons/org.cups.cupsd.plist
sudo launchctl load /System/Library/LaunchDaemons/org.cups.cupsd.plist

Step 4: make executable

chmod +x /usr/local/sbin/

Step 5: create local.cups.plist launch daemon

cat << "EOF" | sudo tee /Library/LaunchDaemons/local.cups.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

Step 6: reboot


Want things back the way they were before following this guide? No problem!

Step 1: delete PreserveJobHistory Off line from cupsd.conf

sudo sed -i "" "/PreserveJobHistory Off/d" /etc/cups/cupsd.conf

Step 2: delete script

sudo rm /usr/local/sbin/

Step 3: delete local.cups.plist launch daemon

sudo rm /Library/LaunchDaemons/local.cups.plist

Step 4: reload CUPS

sudo launchctl unload /System/Library/LaunchDaemons/org.cups.cupsd.plist
sudo launchctl load /System/Library/LaunchDaemons/org.cups.cupsd.plist

Step 5: reboot


Contributors: Sun KnudsenSun Knudsen
Wish to contribute or need help? Read the docs.
Copyright (c) Sun Knudsen
Get in touch