Background
Package names without respective repositories are misleading. You can't reproduce selections from system A on system B simply with package names.
I'm in situation where this matters a lot.
Dumb .iso or .exe files downloaded from central servers on the Internet are more transparent and less ambiguous than *NIX and "smart" packages (especially RPM and DEB).
Just imagine to install thief1.com/setup.exe, thief2.com/setup.exe, thief3.com/setup.exe because yourbank.com/setup.exe failed...
It isn't enough to know thief1.com, thief2.com, thief3.com are present in your system. You need to know (somehow) that it was thief2.com/setup.exe.
Question
Is there any way to get a list of installed packages with their sources (origin, PPA)?
Similar to these links for Ubuntu:
Ideally I also want versions too:
- https://packages.ubuntu.com/source/focal/htop/2.2.0-2build1
- https://packages.ubuntu.com/source/bionic/htop/2.1.0-3
I'm looking for an answer for any distro because I haven't heard of any way to do this anywhere. If you can do this for RPM/DEB somewhere that would be great. The best answer would be without preconfiguration, but I will also accept an answer with hacks and hooks to get job done.
Notes
- This question isn't about getting package source code.
- This question isn't about installing packages from Source