I want to check a package's license before installing with apt and flatpak.
This would be particularly useful in PPAs / custom repositories that allow non-FLOSS licenses, and may have non-FLOSS dependencies too.
It has to be possible, since Discover can apparently do it, at least for official packages (though maybe it's impossible for custom repos, since they aren't on Launchpad?). At least Flathub does have license info on package's pages.
But I want to check it via command-line.
snap info $PKG_NAME
can be used to check license of uninstalled snap packages - OKapt info $PKG_NAME
/apt-cache show $PKG_NAME
doesn't (always?) have license informationflatpak info $PKG_ID
only works for installed packagesflatpak search $PKG_NAME -vv
took way too long to show basically no information
Ideally there should be an easy way to check privacy policies too, but I suppose that's asking too much...
Related:
- How to get to know the information about a package before installation in terminal
apt-cache
andapt info
don't seem to have license information - How do you find the licenses for everything installed on your system?
How do I find out the license for each of my installed applications/packages?
These seem to be only for packages already installed, but I want to check it before installation.
https://changelogs.ubuntu.com/changelogs/pool/universe/d/dotnet6/dotnet6_6.0.110-0ubuntu1/copyright
. So I suppose it would be possible for someone to make some simple script that from a package name gets what's necessary to fill in the things in the patternhttps://changelogs.ubuntu.com/changelogs/pool/<section>/*/<pkg>/<pkg-version>/copyright
and shows the downloaded file. Even better if you could process the file and show only a summary of the licenses.