How can I stop apt from downloading every binary architecture but keep downloading packages available for all architectures? We know how to limit it to one architecture, but how do we block all binaries?
For example, I would rather not trust these weird packages from Microsoft:
$ cat /etc/apt/sources.list.d/microsoft-prod.list
deb [arch=amd64,arm64,armhf signed-by=/usr/share/keyrings/microsoft-prod.gpg] https://packages.microsoft.com/ubuntu/24.10/prod oracular main
$ grep '^Package' /var/lib/apt/lists/packages.microsoft.com_ubuntu_24.10_prod_dists_oracular_main_binary-amd64_Packages
Package: mssql-tools18
Package: msodbcsql18
I've tried arch=none
but that gives:
Notice: Skipping acquire of configured file 'main/binary-none/Packages' as repository 'https://packages.microsoft.com/ubuntu/24.10/prod oracular InRelease' doesn't support architecture 'none'
Emptying arch=
is worse because apt stops working altogether:
Error: Malformed entry 1 in list file /etc/apt/sources.list.d/microsoft-prod.list ([option] no value)
Error: The list of sources could not be read.
For use with other applications, I still want to install packages-microsoft-prod
to have /usr/share/doc/packages-microsoft-prod/microsoft-prod.gpg
. Surely, it must be possible to set up a filter to just allow this unique package?
$ grep-aptavail -P packages-microsoft-prod -s Package,Architecture
Package: packages-microsoft-prod
Architecture: all