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.
alias apt='sudo apt 'means that the next work is considered for alias expansion too (so theinstallinapt install ..is also expanded as an alias. Have you also made an alias forinstall? Useset -x; apt install ...; set +xto see what bash runs exactly. – muru Mar 22 '22 at 05:13aliasshows them all.. and the space is so I can use aliases to common directories.. I can typevi fstaband it will runvi /etc/fstabI also have one forcat sourceswill then becat /etc/apt/sources.list– alchemy Mar 22 '22 at 05:23mvshould do this by default, or at least have a flag for it I could alias, in my opinion. So many Ubuntu users, only have one user and have to use root to manipulate so many things as root. – alchemy Mar 22 '22 at 05:46type <alias>; ..to all of them.. or it looks like there might be a shopt setting. – alchemy Mar 22 '22 at 05:53