-3

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:

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
  • 4
    What distro are you running? Please add more details to your question. – ajgringo619 Dec 11 '20 at 17:49
  • @ajgringo619 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. – user894319twitter Dec 11 '20 at 17:56
  • This will get you started: https://www.linux.com/news/how-install-packages-source-linux/. I've done this when I needed to have a package built with different config settings. On Linux Mint, this is pretty straight-forward. – ajgringo619 Dec 11 '20 at 18:01
  • 2
    @user894319twitter Please [edit] your question to add clarification, background information or any other requested information. Please explain what you want to achieve. For Debian based systems see the answers in https://unix.stackexchange.com/q/121041/330217. – Bodo Dec 11 '20 at 18:01
  • I'm sorry! I meant "source" in "origin" sense. – user894319twitter Dec 11 '20 at 18:04
  • added backgroud – user894319twitter Dec 19 '20 at 04:07

1 Answers1

0

Last apt version (apt 1.6.12ubuntu0.2 (amd64)) can do big fraction of what I want:

apt list --installed

python/bionic,now 2.7.15~rc1-1 amd64 [installed,automatic]
python2.7/bionic-updates,bionic-security,now 2.7.17-1~18.04ubuntu1.2 amd64 [installed,automatic]
python2.7-minimal/bionic-updates,bionic-security,now 2.7.17-1~18.04ubuntu1.2 amd64 [installed,automatic]

But I still need them with better format:

I'm also not sure how to understand "bionic-updates,bionic-security" here...

Broken:

  • It seems to me like this answer should really be an edit to the question as it doesn't actually provide a solution (you are asking follow-up questions in the answer). – Kusalananda Dec 20 '20 at 09:03