Replace libsane version with older one

I want to replace my current libsane version with

  libsane_1.0.25+git20150528-1ubuntu2.16.04.1_amd64.deb

to see if I can resolve the longstanding problem of my scanner not working.

Which of these do I need to uninstall first?

And is there a way to prevent future updates from overwriting the older version?

It seems that you will want to downgrade to the respective Xenial packages for that API library and uninstall all the respective ones of Bionic. Refer to this page and uninstall-install the ones that are necessary.

I'd be cautious if I were you because if the dependencies aren't met properly things will likely break or won't work.

My scanner is not currently working, so I feel like I have nothing to lose.

Unless, it breaks other programs other than xsane?

It might break other programs if there are shared dependencies...