How to Install HPLIP on Ubuntu

Install HPLIP on Ubuntu with sudo apt install hplip hplip-gui for most HP printers, use HP SourceForge .run when your model needs a newer driver, run hp-plugin and hp-setup to add the device, and remove conflicts before switching install methods.

Published

Updated

Read time 8 min read

Reviewed byDeepak Prasad

Install HPLIP on Ubuntu banner with HP printer icon and terminal apt install commands

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.

NOTE
Pick one main install channel (apt or HP .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 .run path: 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.


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:

bash
sudo apt update
sudo apt install -y hplip hplip-gui

Optional local documentation (not required for printing):

bash
sudo apt install -y hplip-doc

On Ubuntu 25.04, after hplip-gui was added on a host that already had hplip, the tail of the install looked like this:

text
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:

bash
dpkg -l | grep '^ii.*hplip'
apt-cache policy hplip hplip-gui
text
ii  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)
text
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 Packages

What 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.

IMPORTANT

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):

bash
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 -y

Download 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:

bash
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.run

The download completed as a Makeself archive (~30 MB on disk):

text
hplip-3.26.4.run: POSIX shell script executable, self-executable archive, Makeself 2.4.0

Inspect metadata without installing:

bash
chmod +x hplip-3.26.4.run
./hplip-3.26.4.run --info
text
Identification: HPLIP 3.26.4 Self Extracting Archive
Target directory: hplip-3.26.4
Uncompressed size: 63144 KB
Script run after extraction:
     ./hplip-install

Run the installer

bash
./hplip-3.26.4.run

The 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:

bash
sudo hp-uninstall
sudo rm -rf /usr/share/hplip/ /root/.hplip

Then reinstall Ubuntu packages if you want to return to apt-managed HPLIP:

bash
sudo apt install -y hplip hplip-gui

Method 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.

bash
sudo snap install hplip-printer-app

After install, open http://localhost:8000/ (or 8001 if another Printer Application is already bound) and add your queue from the browser.

HINT
Use this path when you only need printing through a self-contained Snap. Scanning, 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:

bash
hp-plugin

Run 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:

bash
sudo hp-setup -u

Headless or SSH session:

bash
sudo hp-setup -i

For a network printer when you already know the IP:

bash
sudo hp-setup -i 192.168.1.50

The 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:

bash
dpkg -l hplip hplip-gui

Runtime dependency scan:

bash
hp-check -r

The first lines identify the installed branch:

text
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.log

hp-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:

bash
hp-info -d

(With no hardware connected this may return nothing—that is expected in a lab VM.)


Uninstall HPLIP

APT install

bash
sudo apt purge -y hplip hplip-gui hplip-doc hplip-data \
  libsane-hpaio printer-driver-hpcups printer-driver-hpijs
sudo apt autoremove -y

See how to remove software on Ubuntu if you also installed the Snap printer app.

HP .run install

bash
sudo hp-uninstall
sudo rm -rf /usr/share/hplip/ /root/.hplip

Snap

bash
sudo snap remove --purge hplip-printer-app

Troubleshooting

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


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.


Frequently Asked Questions

1. How do I install HPLIP on Ubuntu?

Run sudo apt update, then sudo apt install -y hplip hplip-gui. Add hplip-doc only if you want local documentation. After install, run hp-plugin as your user if your model needs HP proprietary code, then sudo hp-setup -u to add the printer or scanner to CUPS.

2. Is HPLIP available in Ubuntu apt repositories?

Yes. The hplip package is in Ubuntu main and hplip-gui is in universe on current releases. Ubuntu 25.04 ships HPLIP 3.24.4 as of this update—enough for many HP inkjet and laser devices without downloading anything from HP.

3. When should I use the HP .run installer instead of apt?

Use HP SourceForge .run when your printer minimum HPLIP version on developers.hp.com is newer than the version from apt-cache policy hplip, or when hp-setup cannot find your model. Purge apt HPLIP packages first—mixing .deb and .run installs causes conflicts per HP and Ask Ubuntu guidance.

4. Are there PPAs with newer HPLIP for Ubuntu?

No reliable community PPA replaces HP official builds. Ask Ubuntu and HP recommend either Ubuntu repository packages or the official .run from SourceForge—not third-party PPAs that may lag security updates or break CUPS integration.

5. How do I install the HP proprietary HPLIP plugin?

Install hplip-gui, then run hp-plugin as a normal user (not root). Accept HP license terms when prompted; the tool downloads the binary plugin for models that require it. Some all-in-one devices will not scan or fax until this step completes.

6. How do I add my HP printer after installing HPLIP?

Run sudo hp-setup -u on a desktop for the graphical wizard, or sudo hp-setup -i for interactive text mode. Connect the printer via USB or ensure it is on the same network, pick the detected model, and print a test page when offered.

7. How do I check whether HPLIP is installed correctly?

Run dpkg -l hplip hplip-gui to confirm packages, then hp-check -r for runtime dependency checks. hp-check can take a minute and may list MISSING items until you install hp-plugin or connect hardware—read the status lines rather than stopping at the banner text.

8. How do I uninstall HPLIP from Ubuntu?

For apt installs: sudo apt purge -y hplip hplip-gui hplip-doc hplip-data libsane-hpaio printer-driver-hpcups printer-driver-hpijs && sudo apt autoremove -y. For .run installs: sudo hp-uninstall, then remove leftover /usr/share/hplip if needed. See how to remove software on Ubuntu for related cleanup.
Deepak Prasad

R&D Engineer

Founder of GoLinuxCloud with more than 15 years of expertise in Linux, Python, Go, Laravel, DevOps, Kubernetes, Git, Shell scripting, OpenShift, AWS, Networking, and Security. With extensive …