How can I remove an updated hplip completely and replace it with the version from Ubuntu repos in 18.04?

25,826

You should definitely follow the guide here that has the proper steps to avoid my issues.

When installing or removing hplip on Ubuntu, there are actually 2 separate packages: hplip and hplip-gui. You have to respectively 1) install / 2) remove both packages. I had missed the very existence of the hplip-gui package completely at first, which is most probably the main reason for my issue.

I realized this too late, having already done step 1) of the fix below.

So what I actually had to do that fixed my issue the ugly way was to 1) follow the guide to uninstall hplip on HP developer portal 2) since reinstalling hplip and hplip-gui from Ubuntu repo did not work after this step (hp-setup was missing even after installation because of deleting a few folders as part of step 1), I had to download the exact same hplip version as in the repo directly from HP developer portal (sourceforge) and install it.

This fixed my issue, but I have reason to believe that simply uninstalling / reinstalling both hplip and hplip-gui packages would have solved it as well, so anyone in the same situation should definitely start by doing this to avoid having to do what I did.

Share:
25,826

Related videos on Youtube

funkypitt
Author by

funkypitt

Updated on September 18, 2022

Comments

  • funkypitt
    funkypitt almost 2 years

    I installed a more recent version of hplip than the one distributed with 18.04, which made it impossible to install hp-plugin properly. So I want to get rid of the updated version and reinstall the version that came with 18.04.

    I tried both sudo apt remove hplip and sudo apt purge hplip, then in both cases reinstalled with sudo apt install hplip.

    But when I run hp-plugin after reinstall, the framework listed is still the updated version instead of the version from the Ubuntu repositories. Besides, the hp icon in the notification area is still there as well, so clearly not everything has been removed.

    What can I do to either 1) completely remove all the components from the updated version or 2) install the version from the repositories in a way that will overwrite all the updated components?

    In other words, how can I effectively completely replace the updated hp drivers and software with the ones from the repo? I'm getting so fed-up that I am considering reinstalling Ubuntu from scratch, which would be an humiliating defeat...

    EDIT: I found a convoluted way to fix it (see in the comments below), but a shorter fix would have quite possibly been to simply add sudo apt install --reinstall hplip-gui in my reinstallation process. While the developer portal has a single package, ubuntu separates hplip and hplip-gui!

    • Soren A
      Soren A about 5 years
      how did you install the newer version ?
    • funkypitt
      funkypitt about 5 years
      I downloaded the latest .run script for ubuntu on hp's developer portal then ran it.
    • Soren A
      Soren A about 5 years
      Then you have to check hp's developer portal on how to uninstall.
    • funkypitt
      funkypitt about 5 years
      It... makes sense. I will look into it and update when I'm done. Thanks.
    • funkypitt
      funkypitt about 5 years
      I followed the guide to uninstall on hp's developer portal, which involved manually deleting several folders. It was quite possibly a mistake: even after reinstalling both hplip and hplip-gui, the hp-setup command was gone (when I tried running it, it was suggested to install the hplip package, which was installed). Eventually, the fix that I found was to install the same version number as in the repo from hp's developer portal on top of the ubuntu package. Then it worked! Thanks for your help. It may be that my only mistake when I tried to reinstall was forgetting to also install hplip-gui
    • N0rbert
      N0rbert about 5 years
      Possible duplicate of How to install latest HPLIP on my Ubuntu to support my HP printer and/or scanner? (follow Uninstallation part).
    • funkypitt
      funkypitt about 5 years
      Thank you all for you assistance, and for suggesting that it was a duplicate.