7

I'm running Ubuntu 20.04. I just noticed after issuing snap list command that my list of installed snaps includes cups, version 2.4.2-4. Directory /snap/cups was updated a few days ago:

drwxr-xr-x 11 root root 159 Oct 22 07:21 836
lrwxrwxrwx  1 root root   3 Nov  1 19:38 current -> 836

This snap wasn't previously there last time I checked. I don't remember installing it manually. Synaptic Package Manager still shows cups-* DEB packages installed on my system in version 2.3.1-9ubuntu1.2 (cups-daemon, cups-common, cups-core-drivers etc.)

Both DEB and snap packages seem to be running on my system, if I read the output of ps correctly:

root         919       1  0 20:34 ?        00:00:00 /usr/sbin/cupsd -l
root         928       1  0 20:34 ?        00:00:00 /usr/sbin/cups-browsed
root         936       1  0 20:34 ?        00:00:00 /bin/sh /snap/cups/836/scripts/run-cups-browsed
root         938       1  0 20:34 ?        00:00:00 /bin/sh /snap/cups/836/scripts/run-cupsd
root        1223     938  0 20:34 ?        00:00:00 cupsd -f -s /var/snap/cups/common/etc/cups/cups-files.conf -c /var/snap/cups/common/etc/cups/cupsd.conf
root        1311     936  0 20:34 ?        00:00:00 /bin/sh /snap/cups/836/scripts/run-cups-browsed

Has Canonical recently replaced CUPS DEB version with snap version in Ubuntu 20.04 without telling anyone? If yes, why both are running? If no, what might have installed the snap version and what is it used for?

If this is of any help, here's the full output of my snap list:

Name               Version                     Rev    Tracking         Publisher      Notes
bare               1.0                         5      latest/stable    canonical✓     base
caprine            2.56.1                      52     latest/stable    sindresorhus   -
chromium           107.0.5304.87               2168   latest/stable    canonical✓     -
core               16-2.57.2                   13886  latest/stable    canonical✓     core
core18             20221027                    2620   latest/stable    canonical✓     base
core20             20220919                    1634   latest/stable    canonical✓     base
cups               2.4.2-4                     836    latest/stable    openprinting✓  -
gnome-3-28-1804    3.28.0-19-g98f9e67.98f9e67  161    latest/stable    canonical✓     -
gnome-3-34-1804    0+git.3556cb3               77     latest/stable/…  canonical✓     -
gnome-3-38-2004    0+git.6f39565               119    latest/stable    canonical✓     -
gtk-common-themes  0.1-81-g442e511             1535   latest/stable/…  canonical✓     -
overlay            0.2                         10     latest/stable    kyrofa         -
snap-store         41.3-64-g512c0ff            599    latest/stable    canonical✓     -
snapd              2.57.4                      17336  latest/stable    canonical✓     snapd
syzygy             v1.0.1                      2      latest/stable    popey          -

Update: There was an answer to this question (now non-existent) that told me to remove the CUPS snap - it should apparently be not possible if other snap depends on it. However, I was able to remove it without any problem. I checked snap list and it wasn't there. Today I got a notification that it wants to update (see screenshot below), so I did snap list again and it is there.

I checked journalctl -ru snapd as indicated in the (now non-existent) answer and it turns out that after I removed the snap on November 9th, it got somehow installed again on November 12th. The log shows:

Nov 12 22:01:20 jarek-02 snapd[786]: snap has no updates available: "bare", "caprine", "chromium", "core", "core18", "core20", "cups", "gnome-3-28-1804", "gnome-3-34-1804", "gnome-3-38-2004", "gtk-common-themes", "overlay", "snap-store", "snapd"
Nov 12 22:01:20 jarek-02 snapd[786]: storehelpers.go:748: cannot refresh:
Nov 12 16:49:20 jarek-02 snapd[786]: storehelpers.go:748: cannot refresh snap "chromium": snap has no updates available
Nov 12 16:48:58 jarek-02 snapd[786]: autorefresh.go:540: auto-refresh: all snaps are up-to-date
Nov 12 16:48:58 jarek-02 snapd[786]: snapstate.go:1591: cannot refresh snap "chromium": snap "chromium" has "refresh-snap" change in progress
Nov 12 16:48:58 jarek-02 snapd[786]: snap not found: "syzygy"
Nov 12 16:48:58 jarek-02 snapd[786]: snap has no updates available: "bare", "caprine", "core", "core18", "core20", "gnome-3-28-1804", "gnome-3-34-1804", "gnome-3-38-2004", "gtk-common-themes", "overlay", "snap-store", "snapd"

So If I read it correctly, on Nov 12, 16:48, the CUPS snap wasn't there (it is not listed in "snap has no updates available" message and the same set of snaps is listed in previous occurrences of that message), and on the next check, on Nov 12, 22:01, it was already there. Between these two, the Chromium snap was updated. So is it possible that the CUPS snap is automatically installed with Chromium?

enter image description here

5
  • 2
    You can use the commands in this answer to find out which snap is pulling the cups snap in.
    – mook765
    Dec 14, 2022 at 20:31
  • @mook765 Yep, looks it's Chromium. Thanks for the link! I posted this as an answer.
    – raj
    Dec 14, 2022 at 23:04
  • sudo apt-get purge snapd Oct 18 at 5:42
  • 1
    @PiotrHenrykDabrowski I need Chromium, and this is available only as snap, so removing snapd is not possible.
    – raj
    Oct 18 at 12:48
  • @raj It is possible to install Chromium .deb from Mint repositories. Or use my repo to do the same: freeshell.de/phd/chromium Oct 20 at 6:36

1 Answer 1

6

Looks like it's in fact Chromium pulling in the CUPS snap. I followed the answer linked in the comment and got the following output:

raj@jarek-02:~$ grep "cups:" /snap/*/*/meta/snap.yaml
/snap/chromium/2238/meta/snap.yaml:  foo-install-cups:
/snap/chromium/2254/meta/snap.yaml:  foo-install-cups:
/snap/chromium/current/meta/snap.yaml:  foo-install-cups:
/snap/cups/836/meta/snap.yaml:  etc-cups:
/snap/cups/836/meta/snap.yaml:  cups:
/snap/cups/872/meta/snap.yaml:  etc-cups:
/snap/cups/872/meta/snap.yaml:  cups:
/snap/cups/current/meta/snap.yaml:  etc-cups:
/snap/cups/current/meta/snap.yaml:  cups:

The *.yaml files for Chromium snap contain foo-install-cups, so it looks like it's actually installation/update of Chromium snap that pulls in the CUPS one.

1
  • +1 Great detective work.
    – user535733
    Dec 15, 2022 at 0:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .