Skip to content

Instantly share code, notes, and snippets.

@anxkhn
Last active March 17, 2026 16:04
Show Gist options
  • Select an option

  • Save anxkhn/81c9da2b2646e0cd2e90ab0da8be9ae9 to your computer and use it in GitHub Desktop.

Select an option

Save anxkhn/81c9da2b2646e0cd2e90ab0da8be9ae9 to your computer and use it in GitHub Desktop.
HP LaserJet 1020 on Modern macOS

HP LaserJet 1020 on Modern macOS (Ventura / Sonoma / Sequoia / macOS 26)

Note

A simpler, community-maintained, self-contained repository with all steps is now available:
https://github.com/anxkhn/hp1020-driver-mac

It is only ~4 MB compared to ~500+ MB for the Apple driver package used below.

HP never released official drivers for the LaserJet 1020 on modern macOS. This guide patches Apple's HP driver package to bypass the OS version block and uses the compatible LaserJet 1022 PPD.

Tested on: macOS 26.3


Step 1 — Download the HP Driver Package from Apple

curl -L -o ~/Downloads/hpdrivers.dmg \
  "https://updates.cdn-apple.com/2020/macos/001-41745-20201210-DBC9B46B-88B2-4032-87D9-449AF1D20804/HewlettPackardPrinterDrivers.dmg"

Wait for the ~584MB download to complete.


Step 2 — Mount and Expand the Package

hdiutil attach ~/Downloads/hpdrivers.dmg
pkgutil --expand /Volumes/HP_PrinterSupportManual/HewlettPackardPrinterDrivers.pkg ~/Downloads/hp-expand
hdiutil eject /Volumes/HP_PrinterSupportManual

Step 3 — Patch the OS Version Check

The installer blocks macOS newer than 12.0. Patch it to allow your version:

For macOS 26.x:

sed -i '' "s/'12.0'/'26.9'/g" ~/Downloads/hp-expand/Distribution

For macOS 15.x (Sequoia):

sed -i '' "s/'12.0'/'15.9'/g" ~/Downloads/hp-expand/Distribution

For macOS 14.x (Sonoma):

sed -i '' "s/'12.0'/'14.9'/g" ~/Downloads/hp-expand/Distribution

Verify the patch worked:

grep "compareVersions" ~/Downloads/hp-expand/Distribution

Step 4 — Repackage and Install

pkgutil --flatten ~/Downloads/hp-expand ~/Downloads/HP_Drivers_Patched.pkg
sudo installer -pkg ~/Downloads/HP_Drivers_Patched.pkg -target /

Verify the install:

pkgutil --pkgs | grep -i hewlett
# should output: com.apple.pkg.HewlettPackardPrinterDrivers

Also verify the 1022 PPD is present:

ls "/Library/Printers/PPDs/Contents/Resources/HP LaserJet 1022.gz"

Step 5 — Connect the Printer and Add It

  1. Connect the HP LaserJet 1020 via USB (USB-B cable → USB-A port, use USB-C adapter if needed)
  2. Power the printer on
  3. Detect the USB device:
lpinfo -v | grep -i usb
# should show: direct usb://Hewlett-Packard/HP%20LaserJet%201020?serial=...
  1. Add the printer using the 1022 driver (copy the full URI from the output above):
lpadmin -p "HP_LaserJet_1020" -E \
  -v "usb://Hewlett-Packard/HP%20LaserJet%201020?serial=YOURSERIAL" \
  -P "/Library/Printers/PPDs/Contents/Resources/HP LaserJet 1022.gz" \
  -D "HP LaserJet 1020"

Step 6 — Print

# print a file
lp -d HP_LaserJet_1020 /path/to/file.pdf

# print a specific page
lp -d HP_LaserJet_1020 -o page-ranges=2 /path/to/file.pdf

Cleanup (optional)

rm -rf ~/Downloads/hp-expand ~/Downloads/hpdrivers.dmg ~/Downloads/HP_Drivers_Patched.pkg

Notes

  • The LaserJet 1022 PPD is used — it is fully compatible with the 1020 hardware
  • The lpadmin: Printer drivers are deprecated warning from CUPS is harmless
  • This was tested working as of macOS 26.3 (March 2026)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment