hp-clean
Remove queued or incomplete HP print jobs
SYNOPSIS
hp-clean [OPTIONS]
PARAMETERS
-q, --clean-queues
Cleans the print queues, removing all pending and stalled print jobs associated with HP printers.
-t, --clean-tmpfiles
Removes temporary files generated by the HPLIP system, which can accumulate over time.
-l, --clean-logs
Clears HPLIP-specific log files, useful for freeing up disk space or for fresh debugging.
-a, --clean-all
Performs a comprehensive cleanup, equivalent to running with -q, -t, and -l combined. This is the default action if no specific cleanup option is provided.
-y, --assume-yes
Automatically assumes 'yes' to all prompts, allowing the command to run non-interactively without user confirmation.
--version
Displays the current version of the HPLIP software and exits.
--help
Shows a help message with available options and their descriptions.
DESCRIPTION
The hp-clean command is an essential utility within the HPLIP (HP Linux Imaging and Printing) software suite. Its primary function is to help troubleshoot and resolve common printing issues by cleaning up various components of the HP printing system on a Linux machine. This includes removing stalled print jobs from the CUPS (Common Unix Printing System) queue, deleting temporary files generated by HPLIP, and clearing accumulated log files.
Regular use of hp-clean can help resolve problems like print jobs stuck in the queue, printers appearing offline due to configuration issues, or general system sluggishness caused by excessive log or temporary files. It provides a quick way to reset the printing environment related to HP devices without requiring a full reinstallation of the HPLIP software.
CAVEATS
The hp-clean command requires the HPLIP software suite to be installed on the system. It may require root or sudo privileges to effectively clean system-wide print queues and log files. Using this command will stop any currently printing jobs related to HP devices and clear all pending jobs in the queue. Always use with caution, especially if you have important jobs waiting to print.
USAGE CONTEXT
hp-clean is most commonly invoked when troubleshooting stalled print jobs, when a printer is not responding, or after a printer configuration change. It serves as a first-line diagnostic and remediation tool to bring the HP printing system back to a clean, operational state.
HISTORY
The hp-clean utility is an integral part of the HPLIP (HP Linux Imaging and Printing) project, which has been under active development since the early 2000s. Conceived to provide robust support for HP printers and scanners on Linux systems, HPLIP quickly became the de facto standard. hp-clean was introduced as a crucial troubleshooting tool, evolving alongside the main HPLIP suite to address common user issues like stalled print jobs and accumulated temporary files, reflecting the project's commitment to user-friendly maintenance.