Some time ago I uninstalled snap, and probably messed things up cause now I can't install it back. When I try to run sudo apt install snapd
this error appears:
Package snapd is not available, but is referred to by another package.This may mean that the package is missing, has been obsoleted, oris only available from another sourceE: Package 'snapd' has no installation candidate
My system specs:
What should I do?
Ps. I tried:
sudo apt-get purge snapdsudo apt-get install snapd
didn't work.
cat /etc/apt/sources.list
displays this:
# deb cdrom:[Ubuntu 20.04.4 LTS _Focal Fossa_ - Release amd64 (20220223)]/ focal main restricted# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to# newer versions of the distribution.deb http://archive.ubuntu.com/ubuntu jammy main restricted# deb-src http://it.archive.ubuntu.com/ubuntu/ focal main restricted## Major bug fix updates produced after the final release of the## distribution.# deb-src http://it.archive.ubuntu.com/ubuntu/ focal-updates main restricted## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu## team. Also, please note that software in universe WILL NOT receive any## review or updates from the Ubuntu security team.deb http://archive.ubuntu.com/ubuntu jammy universe# deb-src http://it.archive.ubuntu.com/ubuntu/ focal universe# deb-src http://it.archive.ubuntu.com/ubuntu/ focal-updates universe## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu## security team.deb http://archive.ubuntu.com/ubuntu jammy multiverse# deb-src http://it.archive.ubuntu.com/ubuntu/ focal multiverse# deb-src http://it.archive.ubuntu.com/ubuntu/ focal-updates multiverse## N.B. software from this repository may not have been tested as## extensively as that contained in the main release, although it includes## newer versions of some applications which may provide useful features.## Also, please note that software in backports WILL NOT receive any review## or updates from the Ubuntu security team.# deb-src http://it.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiversedeb http://archive.ubuntu.com/ubuntu jammy-security main restricted# deb-src http://security.ubuntu.com/ubuntu focal-security main restricteddeb http://archive.ubuntu.com/ubuntu jammy-security universe# deb-src http://security.ubuntu.com/ubuntu focal-security universedeb http://archive.ubuntu.com/ubuntu jammy-security multiverse# deb-src http://security.ubuntu.com/ubuntu focal-security multiverse# This system was installed using small removable media# (e.g. netinst, live or single CD). The matching "deb cdrom"# entries were disabled at the end of the installation process.# For information about how to configure apt package sources,# see the sources.list(5) manual.deb http://security.ubuntu.com/ubuntu/ jammy-security universe restricted main multiverse
sudo apt update && sudo apt -f install && sudo apt full-upgrade
displayed this:
Hit:1 https://cli.github.com/packages stable InReleaseHit:2 http://repository.spotify.com stable InRelease Hit:3 http://archive.ubuntu.com/ubuntu jammy InRelease Hit:4 https://download.docker.com/linux/ubuntu jammy InRelease Hit:5 http://archive.ubuntu.com/ubuntu jammy-security InRelease Hit:6 http://security.ubuntu.com/ubuntu jammy-security InRelease Hit:7 http://packages.microsoft.com/repos/code stable InRelease Hit:8 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy InRelease Hit:9 https://dl.google.com/linux/chrome/deb stable InRelease Hit:10 https://packages.redis.io/deb jammy InRelease Hit:11 https://ppa.launchpadcontent.net/obsproject/obs-studio/ubuntu jammy InReleaseHit:12 https://ppa.launchpadcontent.net/pipewire-debian/pipewire-upstream/ubuntu jammy InReleaseHit:13 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/jammy pgadmin4 InReleaseReading package lists... DoneBuilding dependency tree... DoneReading state information... DoneAll packages are up to date.Reading package lists... DoneBuilding dependency tree... DoneReading state information... Done0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.Reading package lists... DoneBuilding dependency tree... DoneReading state information... DoneCalculating upgrade... Done0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
ls /etc/apt/preferences.d/
displayed this:
nosnap.pref
cat nosnap.pref
displayed this:
# To prevent repository packages from triggering the installation of snap,# this file forbids snapd from being installed by APT.Package: snapdPin: release a=*Pin-Priority: -10
Thank you in advance.