HPLIP (HP Linux Imaging and Printing) is HP’s official driver stack for printing, scanning, and faxing on Linux. If you own an HP inkjet or laser device, Ubuntu’s default CUPS drivers often are not enough—especially for scanning, ink-level widgets, or newer hardware. HPLIP fills that gap with hp-setup, hp-plugin, and the HP Device Manager GUI.
This guide walks through installing HPLIP on Ubuntu the way most people should: apt first, HP’s SourceForge .run installer when your model needs a newer branch, and optional Snap printing only when you want a browser-based queue. I ran these steps on Ubuntu 25.04 and kept real terminal output below so you can compare your machine.
Tested on: Ubuntu 25.04 (Plucky Puffin); kernel 6.14.0-37-generic; amd64.
.run). If you switch from apt to the .run installer, purge existing hplip packages first—HP and Ask Ubuntu both warn that overlapping installs cause broken queues and mixed file trees.
Prerequisites
- Ubuntu 22.04 LTS, 24.04 LTS, or newer (25.04 tested here) on amd64 or i386—see check Ubuntu version.
- sudo for package installs and
hp-setup. - Your HP printer or scanner connected (USB) or reachable on the LAN for setup.
- Roughly 200–400 MB disk for apt packages and dependencies—check free space with linux check disk space if the root filesystem is tight.
- For the
.runpath: build tools and headers the installer may pull via apt (gcc, python dev packages, etc.)—the installer prompts when something is missing.
Choose an install method
| Method | Best for | Jump to |
|---|---|---|
APT (hplip, hplip-gui) |
Most Ubuntu users; integrated updates with apt upgrade |
Method 1 |
HP SourceForge .run |
Printers whose required HPLIP version is newer than Ubuntu’s package | Method 2 |
Snap hplip-printer-app |
Print-only setups via OpenPrinting’s browser UI (no classic hp-setup) |
Method 3 |
For most desks and home offices, Method 1 is the right default. Move to Method 2 only when HP’s model database or hp-setup says your device needs a newer HPLIP than apt-cache policy hplip shows.
Method 1: Install HPLIP from Ubuntu repositories (recommended)
Ubuntu ships hplip in main and the Qt GUI tools in universe. Install the core driver plus the GUI package—you need hplip-gui before hp-plugin on many models.
Update indexes, then install:
sudo apt update
sudo apt install -y hplip hplip-guiOptional local documentation (not required for printing):
sudo apt install -y hplip-docOn Ubuntu 25.04, after hplip-gui was added on a host that already had hplip, the tail of the install looked like this:
Setting up python3-dbus.mainloop.pyqt5 (5.15.11+dfsg-2) ...
Setting up hplip-gui (3.24.4+dfsg0-0ubuntu5) ...
Setting up python3-notify2 (0.3.1-1) ...
Setting up xsane-common (0.999-12.2) ...
Setting up xsane (0.999-12.2) ...
Processing triggers for man-db (2.13.0-1) ...Confirm packages and version:
dpkg -l | grep '^ii.*hplip'
apt-cache policy hplip hplip-guiii hplip 3.24.4+dfsg0-0ubuntu5 amd64 HP Linux Printing and Imaging System (HPLIP)
ii hplip-data 3.24.4+dfsg0-0ubuntu5 all HP Linux Printing and Imaging - data files
ii hplip-gui 3.24.4+dfsg0-0ubuntu5 all HP Linux Printing and Imaging - GUI utilities (Qt-based)hplip:
Installed: 3.24.4+dfsg0-0ubuntu5
Candidate: 3.24.4+dfsg0-0ubuntu5
500 http://archive.ubuntu.com/ubuntu plucky/main amd64 Packages
hplip-gui:
Installed: 3.24.4+dfsg0-0ubuntu5
Candidate: 3.24.4+dfsg0-0ubuntu5
500 http://archive.ubuntu.com/ubuntu plucky/universe amd64 PackagesWhat each package does
| Package | Role |
|---|---|
hplip |
Core drivers, CLI tools (hp-check, hp-info, hp-setup), CUPS and SANE integration |
hplip-data |
Printer/scanner model database (pulled in automatically) |
hplip-gui |
HP Device Manager (hp-toolbox) and GUI pieces used by hp-plugin |
hplip-doc |
Optional PDF/HTML documentation |
Future security and bugfix updates arrive with normal apt maintenance: sudo apt update && sudo apt upgrade.
Method 2: Install HPLIP from HP SourceForge (.run)
Use this when Ubuntu’s package is too old for your hardware. Check your model on HP’s supported printers list, note the minimum HPLIP version, and compare with apt-cache policy hplip.
Before running the .run file, remove apt-packaged HPLIP so files are not duplicated. Ask Ubuntu documents this purge set (adjust if some packages are not installed on your release):
sudo apt purge -y hplip hplip-data hplip-doc hplip-gui hpijs-ppds \
libsane-hpaio printer-driver-hpcups printer-driver-hpijs
sudo rm -rf /usr/share/hplip/
sudo apt autoremove -yDownload the current installer
HP publishes builds on SourceForge. Replace the version number with whatever is current on that page—3.26.4 was the latest .run at the time of this rewrite:
cd ~/Downloads
wget -c https://sourceforge.net/projects/hplip/files/hplip/3.26.4/hplip-3.26.4.run/download -O hplip-3.26.4.runThe download completed as a Makeself archive (~30 MB on disk):
hplip-3.26.4.run: POSIX shell script executable, self-executable archive, Makeself 2.4.0Inspect metadata without installing:
chmod +x hplip-3.26.4.run
./hplip-3.26.4.run --infoIdentification: HPLIP 3.26.4 Self Extracting Archive
Target directory: hplip-3.26.4
Uncompressed size: 63144 KB
Script run after extraction:
./hplip-installRun the installer
./hplip-3.26.4.runThe embedded hplip-install script checks dependencies, may invoke apt to install missing libraries, and walks through license acceptance and install type. Follow the on-screen prompts. If the installer reports your Ubuntu release as unsupported, stop and stay on Method 1 or wait for a newer HP build—forcing an old .run onto a new LTS leaves a fragile mixed stack.
When installation finishes, HP often launches a setup wizard; you can also configure the device manually in the next section.
Update or remove a .run install
HP does not hook .run installs into apt. To upgrade, download a newer .run and rerun the installer after reviewing HP’s release notes. To remove:
sudo hp-uninstall
sudo rm -rf /usr/share/hplip/ /root/.hplipThen reinstall Ubuntu packages if you want to return to apt-managed HPLIP:
sudo apt install -y hplip hplip-guiMethod 3: OpenPrinting Snap (optional, print-only)
OpenPrinting publishes hplip-printer-app on Snapcraft—a Printer Application that exposes a local web UI instead of classic hp-toolbox / hp-setup.
sudo snap install hplip-printer-appAfter install, open http://localhost:8000/ (or 8001 if another Printer Application is already bound) and add your queue from the browser.
hp-plugin, and HP Device Manager workflows still point to Method 1 or 2 on Ubuntu today.
Configure your HP printer or scanner
Installation is only half the job—you still need the plugin (on supported models) and a CUPS queue.
Install the proprietary plugin
Many HP devices need HP’s binary plugin for full print/scan/fax support:
hp-pluginRun this as your normal user, not with sudo. Accept the license when asked; the utility downloads the plugin from HP. Install hplip-gui first if you see errors about missing GUI dependencies.
Add the device with hp-setup
USB or network discovery from a desktop:
sudo hp-setup -uHeadless or SSH session:
sudo hp-setup -iFor a network printer when you already know the IP:
sudo hp-setup -i 192.168.1.50The wizard installs the correct PPD, registers the queue in CUPS, and offers a test page—use it before you close the window.
GUI alternative
Search Activities for HPLIP or HP Device Manager (hp-toolbox) to manage queues, ink levels, and scanning after setup.
Permissions
Your user should be in lpadmin to administer printers (Ubuntu often adds the first user automatically). Scanning may also need membership in scanner or lp depending on the release. If desktop apps cannot see the scanner, log out and back in after group changes—same pattern as add user to sudo group workflows.
Verify HPLIP
Quick package check:
dpkg -l hplip hplip-guiRuntime dependency scan:
hp-check -rThe first lines identify the installed branch:
HP Linux Imaging and Printing System (ver. 3.24.4)
Dependency/Version Check Utility ver. 15.1
...
Saving output in log file: /tmp/hp-check.loghp-check walks compile-time and runtime dependencies and plugin status. On a machine without a printer attached it can run for a while; read /tmp/hp-check.log when it finishes. Lines marked OK are fine; MISSING often clears after hp-plugin or installing a suggested apt package.
List detected HP devices:
hp-info -d(With no hardware connected this may return nothing—that is expected in a lab VM.)
Uninstall HPLIP
APT install
sudo apt purge -y hplip hplip-gui hplip-doc hplip-data \
libsane-hpaio printer-driver-hpcups printer-driver-hpijs
sudo apt autoremove -ySee how to remove software on Ubuntu if you also installed the Snap printer app.
HP .run install
sudo hp-uninstall
sudo rm -rf /usr/share/hplip/ /root/.hplipSnap
sudo snap remove --purge hplip-printer-appTroubleshooting
| Symptom | Likely cause | What to try |
|---|---|---|
hp-setup cannot find the printer |
USB cable, firewall, or wrong network | Reseat USB; for Wi‑Fi printers use hp-setup -i <IP>; ensure sudo systemctl status cups is active |
| Scanner missing in Simple Scan | Plugin not installed or SANE backend | Run hp-plugin; confirm libsane-hpaio is installed |
cupsext could not be loaded |
Mixed Python or broken partial install | Purge apt HPLIP, reinstall cleanly; on old releases try python3 $(which hp-setup) per Ask Ubuntu |
Package conflict after .run |
apt and .run both installed |
Purge deb packages and /usr/share/hplip, then reinstall one method only |
hp-check shows MISSING plugin |
Model requires proprietary plugin | Run hp-plugin as normal user |
| Ubuntu package too old for new printer | Hardware needs newer HPLIP than LTS ships | Method 2 .run after full purge, or interim Windows/Mac driver until HP supports your Ubuntu release |
References
- HP Developers — HPLIP install
- HP — Ubuntu manual install notes
- HPLIP downloads on SourceForge
- Ask Ubuntu — latest HPLIP when repos lag
- apt command in Linux
- wget command in Linux
Summary
For most Ubuntu users, sudo apt install hplip hplip-gui is the clean path: CUPS and SANE stay integrated, and updates ride along with the rest of the system. When HP’s site lists a newer minimum HPLIP than Ubuntu ships, download the official .run from SourceForge, purge old packages first, and treat upgrades as manual until you switch back to apt.
After either install path, run hp-plugin if your model needs it, then sudo hp-setup -u (or -i) to create the queue and print a test page. Skip random PPAs—they are not a supported substitute. If you only want browser-based printing, the hplip-printer-app Snap is an alternative, but classic scanning and HP Device Manager still lean on apt or the .run stack.

