From man apt
, "install pkg [{=pkg_version_number.." and "A specific version of a package can be selected for installation by following the package name with an equals (=) and the version of the package to select."
I'm assuming no space, but I still get the same error with putting apt install snapd=anything
. I'm going to try to remove the plain focal repo from sources.list, but that isnt a good solution.
I commented out the main focal repo line. I am using UbuntuAdvantage cips which has extra source lists in the source.list.d dir. Removing just the main focal repo, makes apt list
only one version. However, I still get the same error.
Okay, that is strange. I had a hunch it could be from my apt alias (which is alias apt='sudo apt '
so I don't have to type sudo
every time) and sure enough it succeeded. I don't know why.
Putting \
before any alias will unalias it.