6

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 - OK
  • apt info $PKG_NAME / apt-cache show $PKG_NAME doesn't (always?) have license information
  • flatpak info $PKG_ID only works for installed packages
  • flatpak 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:

geekley
  • 459
  • 3
  • 18
  • Currently a way to check it online (from Ubuntu repos only) would be from a URL like `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 pattern `https://changelogs.ubuntu.com/changelogs/pool/
    /*///copyright` and shows the downloaded file. Even better if you could process the file and show only a summary of the licenses.
    – geekley Nov 02 '22 at 20:15

0 Answers0