1

I've previously uninstalled snapd and installed a non-snap Firefox from ppa:mozillateam/ppa. I'm trying to keep it this way, but my FF was just auto-updated to a snap version, and snapd was auto-installed again. How can I prevent it?

I have a file with following contents to prevent snapd installation, at /etc/apt/preferences.d/nosnap.pref:

Package: snapd
Pin: release a=*
Pin-Priority: -10

I also have /etc/apt/preferences.d/mozillateam.pref with following contents:

Package: firefox*
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 1001

This doesn't seem to work anymore. My non-snap firefox was just auto-updated to a snap version, with snapd being installed automatically.

Interestingly, sudo apt autoremove snap rolled the firefox back to a non-snap version, and sudo apt update says there's nothing to update.

On the other hand, sudo apt install snapd --dry-run no longer seems to be blocked by by the above config files.

Not sure if it matters, but apt-cache policy -q | grep snap prints following, among other things:

snapd -> 2.55.5+22.04 с приоритетом 1
snapd -> 2.55.3+22.04 с приоритетом -10

As requested, the output of apt-cache policy snapd:

apt-cache policy snapd
snapd:
  Installed: (none)
  Candidate: 2.55.5+22.04
  Version table:
     2.55.5+22.04 1 (phased 70%)
        500 http://ru.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
     2.55.3+22.04 -10
        500 http://ru.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
        100 /var/lib/dpkg/status

Interestingly, I tried it on a different machine (which didn't receive this auto-update), and there 2.55.5+22.04 had pin priority -10, not 1, and was marked as (phased 80%).

8
  • wfhere comes this from snapd -> 2.55.5+22.04 с приоритетом 1 the lower version is blocked with negative pinning but this version not.
    – nobody
    Jun 10, 2022 at 8:40
  • @nobody I'd also like to know where it comes from. I didn't modify any other configs, and grepping for "snap" in /etc/apt didn't find anything interesting. Jun 10, 2022 at 8:57
  • Please check it with apt-cache policy snapd this will show sources too.
    – nobody
    Jun 10, 2022 at 9:03
  • @nobody Added output. Jun 10, 2022 at 17:42
  • what ubuntu version?
    – Thomas Ward
    Jun 10, 2022 at 17:49

1 Answer 1

1

Not a clean solution; more a workaround.

n=jammy*

-n means codename (here jammy)

The rule for those expressions is that they can occur anywhere where a string (here jammy)can occur Means does not matter if snapd is offerd in jammy or jammy-updates or jammy-security. Please take also a look in man apt_preferences There I found it.

You must log in to answer this question.

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