How to fix E: Package 'package-name' has no installation candidate (installed via snap) in APT
This error occurs when APT blocks installation of a package that is provided as a snap snap on your system. Linux Mint specifically restricts snapd installation to maintain APT control over package management.
Quick fix
Fixes E: Package 'package-name' has no installation candidate (installed via snap)
ls /etc/apt/preferences.d/nosnap.pref- Check if a nosnap preference file exists
- Update your package list
- Remove the snap blocking preferences file (if you want snap support)
- Alternative: Use Flatpak instead of snap
ls /etc/apt/preferences.d/nosnap.prefE: Package 'package-name' has no installation candidate (installed via snap)
What this error means
APT is telling you that the package you're trying to install is not available in the APT repositories. This typically happens when a distribution (like Linux Mint) has deliberately blocked the snap package from being installable via APT. The package may exist as a snap application, but the APT package manager cannot find or is not allowed to install it because of pin priority rules in /etc/apt/preferences.d/. This is a policy decision by distributions to prevent automatic replacement of APT packages with snap versions without user consent.
Typical symptoms
- apt install snapd returns 'has no installation candidate'
- Cannot install snap-based applications through apt
- Linux Mint or Debian-based systems reject snap packages
- Package appears to exist but APT cannot locate it
- Snap packages fail silently with no installation option
Common causes
- Linux Mint and other distributions have set Pin-Priority: -10 for snapd in /etc/apt/preferences.d/nosnap.pref to prevent installation
- The distribution maintainers have explicitly blocked snap packages to maintain control over the package management system
- APT preferences rules forbid installation of packages marked as snap-only
- Repository configuration excludes snap packages from available candidates
How to fix "E: Package 'package-name' has no installation candidate (installed via snap)"
First, verify if your system has a blocking preference file:
ls /etc/apt/preferences.d/nosnap.prefIf the file exists, this confirms APT is deliberately blocking snap packages. If it doesn't exist, the issue may be a package availability problem in your repositories.
Before making changes, refresh your package list to ensure you have the latest repository information:
sudo apt updateThis will re-index all available packages and may resolve the issue if it was just a stale cache.
If you want to enable snap on Linux Mint, remove the nosnap.pref file that blocks snapd:
sudo rm /etc/apt/preferences.d/nosnap.prefThen update your package list again:
sudo apt updateAfter this, you should be able to install snapd and snap packages through APT.
If you prefer not to enable snap support, consider using Flatpak as an alternative universal package manager. Linux Mint includes native Flatpak support:
sudo apt install flatpak
flatpak install flathub <app-name>Flatpak provides similar functionality to snap and may be better integrated with your distribution.
After removing the blocking file, verify that snap works:
sudo apt install snapd
sudo systemctl start snapd
sudo systemctl enable snapd
snap --versionYou should see the snap version if installation was successful.
Advanced notes
Some distributions like Linux Mint have a specific policy against snap because Canonical has made snap the default installation method for certain packages (like Chromium and Firefox) without explicit user consent. This preference blocking is a deliberate design choice. The nosnap.pref file uses APT's Pin-Priority system to set snapd to a negative priority (-10), which makes it ineligible for installation. Other distributions like Debian may have similar restrictions. If you modify or remove the nosnap.pref file, be aware that future system updates might reintroduce it. Some users have also reported that even after removing the block, Ubuntu repositories may still try to install snap packages through 'fake' APT packages that automatically install the snap version instead. Keep an eye on update notifications and review what packages will be installed before confirming.
Frequently asked questions
- What does "E: Package 'package-name' has no installation candidate (installed via" mean?
- APT is telling you that the package you're trying to install is not available in the APT repositories. This typically happens when a distribution (like Linux Mint) has deliberately blocked the snap package from being installable via APT. d/.
- How do I fix "E: Package 'package-name' has no installation candidate (installed via"?
- This error occurs when APT blocks installation of a package that is provided as a snap snap on your system. Linux Mint specifically restricts snapd installation to maintain APT control over package management.
- What causes "E: Package 'package-name' has no installation candidate (installed via"?
- Linux Mint and other distributions have set Pin-Priority: -10 for snapd in /etc/apt/preferences.d/nosnap.pref to prevent installation The distribution maintainers have explicitly blocked snap packages to maintain control over the package management system APT preferences rules forbid installation of packages marked as snap-only
- Is the "E: Package 'package-name' has no installation candidate (installed via" error serious?
- It is a medium-severity error โ more of a blocker than a risk. The steps above resolve it.
Official resources & further reading
- ๐APT Official Documentation
- ๐ฌLinux Mint Forums: Install snapd problem(Stack Overflow)