Deleting xsane scanner software (+dependent packages?)

Rene_Thomas

New Member
Joined
Sep 20, 2017
Messages
15
Reaction score
20
Credits
0
Hi,

I am trying to free up space on my laptop, which is running Linux Ubuntu 16.04, so have been uninstalling software packages, which is something I am quite new to.

Because the xSane scanner program has been inoperative, and furthermore because my printer's packed in altogether, I decided to remove xSane and found advice here

I used the command
sudo apt remove xsane
(I am vague about why it is sometimes called Sane and sometimes xSane, but my system seemed only to recognise the latter) and I deleted xSane successfully.

Do I need to delete dependent packages?

I thought this meant software that is useless without xSane, but when I issued the command
sudo apt-get remove --auto-remove xsane
I got a warning message telling me that gimp was among the dependent packages it would remove and I decided not to go ahead with it, because gimp is a program I use a lot, often just because on my laptop, ImageViewer usually fails to show images (which would be another thread in itself).

The article I was following also mentioned using
sudo apt-get purge
and
sudo apt-get purge --auto-remove
to remove data and configuration files. Is this something that would help me free up memory too?

Apologies for long-windedness and also for asking questions that have probably been asked umpteen other times on other threads.
 


No need to apologise @Rene_Thomas and welcome to linux.org :)

(I am vague about why it is sometimes called Sane and sometimes xSane, but my system seemed only to recognise the latter)

"sane" is related to work at the Terminal, and "xsane" is its graphical front end for use on the desktop. "sane" is an acronym for Scanner Access Now Easy ... define "easy", lol. Windows has TWAIN - technology with an interesting name - Linux has sane.

From the time you enter your password at login, and throughout your desktop session, you are in the X environment (unless using an alternative known as Wayland), and running an X Session.

The instructions you were following seem adequate, but if you are worried about the GIMP bit, consider some options.

See if you can capture the output that mentions GIMP and copy and paste it here, we could look into it.

You could likely still follow through to completion, and then if GIMP does not run, you could purge GIMP either through Terminal or in Synaptic Package Manager, and then reinstall it easily.

If I take it that you are on Xenial Unity (or if not, MATE or GNOME) then you can check if you have Synaptic by going to the Dash top left corner above the launcher and start to type in Synaptic. If it does not show, then

Code:
sudo apt-get -y install synaptic

... will do the trick.

The memory question would likely take a different topic, and we could look at "memory hogs" and "space hogs", sounds like pig farming :rolleyes:

Cheers

Chris Turner
wizardfromoz
 
Hi Rene... it's been awhile! Hope you and the missus are doing well. Removing software usually isn't going to help with memory (except maybe some that might run all the time in the background, but the scanner won't do that).

Maybe describe for us how bad your situation is.... how big is the hard drive, and how full is it? How much memory do you have? If you provide the make/model of the laptop, we might can also learn more about it on Google.

If the drive is so full as to make you want to uninstall standard applications, I would wonder if you are storing a lot of photos and/or videos that you might could save off to USB or DVD to free up space instead?

Cheers
 
Hi wizardfromoz, and thank you for the cyber-sesame-street lesson about the X.

Hi Atanere; hoping likewise that you and your missus are well and that she isn't testing out too many of her inky inventions on you. Your advice about the futility of uninstalling software packages has forced some reconsideration here, though I've been acting under the assumption that it isn't so much the packages themselves that are the "space hogs", but the glut of updates that the Software Updater suggests I install [for them] on a near-daily basis. I managed to rid my computer of the Thunderbird email program for that reason.

As for the warning message I got when I tried to purge xSane, it warns me that,

The following packages will be REMOVED
gimp gimp-data libamd2.4.1 libbabl-0.1-0 libcamd2.4.1 libccolamd2.9.1 libcholmod3.0.6 libgegl-0.3-0 libgimp2.0 libraw15 libsdl1.2debian libumfpack5.7.1 linux-headers-4.4.0-113 linux-headers-4.4.0-113-generic linux-image-4.4.0-113-generic linux-image-extra-4.4.0-113-generic xsane-common
I am getting the same warning when I try to execute the command
sudo apt-get autoremove
which I have come to believe is a necessary space-saver to use every so often to unburden my system of defunct Linux kernels.

I just can't understand why it seems to want to remove GIMP too.
 
Hi @Rene_Thomas

I just can't understand why it seems to want to remove GIMP too.

... nor I, exactly, but can I ask

  1. Did/do you have sane installed as well, or just xsane? (SPM will confirm if you are not sure)
  2. Have you used the scanning facilities from within GIMP?
When GIMP is first used, and not before, it generates a hidden folder in /home/username, with GIMP in the folder name, and it includes a number of subfolders and files which basically incorporate your Settings and Preferences.

In order to better assist, I installed xsane, and later sane, on my own Ubuntu 16.04 'Xenial Xerus' with the Unity DE, and Nautilus shows as follows, under Ctrl-h :

Ck9Ol1s.png


SCREENSHOT 1 - Contents of hidden folder .gimp-2.8

The files appearing like a printed page, dog-eared, can be read by right-clicking them and choosing to open with Text Editor The one I have highlighted makes for an interesting read.

Neither sane nor xsane is installed by default with Ubuntu if there is no printer-scanner in place at time of install, but it may be that one or both is installed if the peripheral device is connected at time of install, and the Ubiquity installer "configures hardware devices".

If you then make use of your scanner with the sane/xsane packages in place, through GIMP, it is perhaps a bug of low priority (to Canonical, makers of Ubuntu) that an intimate relationship is formed, and so when you try to purge/delete the sane/xsane packages, GIMP is perceived as dependencies to be removed, rather than a package/app in its own right.

Once I installed sane/xsane, launching GIMP brings up a popup window saying it is checking for plugins, and lists the xsane references, hence my conclusion.

Back to your main issue/s.

If you wish to follow through with the commands that warned of GIMP being purged/removed, you can do so. It will not remove the reference from your Repositories, and so you can install again from either of SPM or Terminal.

If it were me, I would first make a backup of that hidden folder, in my case, .gimp-2.8, and you can do so with the Backup utility that ships with Ubuntu (you haven't told me if it is Unity you are using, but I am pretty sure that features in the GNOME and MATE DE versions as well).

Two alternatives you might consider are as follows:

  1. Use Aptik to save (all of, including Firefox, Thunderbird, GIMP &c) your settings - see my Tute here https://www.linux.org/threads/aptik-have-settings-will-travel.4529/
  2. Use Timeshift to take a snapshot of your system as it stands, see my Tute here https://www.linux.org/threads/timeshift-similar-solutions-safeguard-recover-your-linux.15241/
Be aware that if you are scrupulous about housekeeping to restore much needed space, then with installs and reinstalls of packages, there may likely be .deb files stored in /var/cache/apt/archives (a similar hierarchy applies to yum-dnf with RPM-based Distros). These are there so that you can install removed packages offline, amongst other reasons.

You could delete them individually using Administrative privileges, or collectively using, from Terminal

Code:
sudo apt-get autoclean

One fellow I know, from my old stomping grounds, whom Brian (@Condobloke ) knows (pcpunk, Brian) was able to recover about 6 GB from using the above, after I let him know about it. He had an 80 GB HDD at the time, so it was very useful.

Hope these ideas help, and as everyone whom knows me will expect, on a Friday afternoon in OZ

Avagudweegend

Wizard
 
Dear Wizard,

I am sorry I haven't checked back here sooner. I am so slack over reading email that once the Linux Forum alerts've been sitting in my inbox for a while I get more and more anxious about opening them and checking back on my threads, in case I find a reply telling off for not having checked back sooner. Illogical behaviour, I know.

It is really kind of you to have gone to so much trouble over my question as to install packages on your own computer to test out what may have happened on my system and so find a solution for me.

The problem with Sane/xSane is solved from another direction now, ie. our printer broke and we decided we didn't use it enough to justify getting another.

I will need to reinstall Gimp now, though, because when I used

sudo apt-get autoremove
to clean away old kernels, as I have been advised to do frequently, also in order to save memory, I got a similar caution about the gimp package being up for removal, and I went along with it, because I thought if I didn't do the cleanup I would end up needing to do more alterations than just reinstalling Gimp.

Thanks for giving me such enthusiastic support !

:D
 

Members online


Top