0

I need to download all installed packages of my current distribution. I am going to need only packages that either were updated or installed after fresh installation. (I prefer not to download packages that were installed by default)

Motivation

I am trying to make a repository of my currently installed packages, and move that repository to another computer which is located in somewhere with unstable radio link (so I can't download the packages). And I know how to make a repository using reprepro and I know how to download packages without installing them. Howewer the problem is to find which packages have been installed or updated.

Distribution: Kubuntu 17.10

Package Manager: apt, dpkg

1

As Kubuntu uses apt:

apt list --installed will get you a list of installed packages.

apt-get -d install <packages> will download, but not unpack or install, packages (presumably into something under /var/cache/), though you know that already.

Your best bet, I would suggest, would be to string these together in a script, maybe with a bit of sed magic as necessary.

  • Doesn't apt list --installed also list packages that were installed by default on OS installation? – sorush-r May 25 '18 at 8:08
  • Well sure, but there's no real way to avoid that -- moreover, specifically in your situation, it's difficult to be sure that the machine with a dodgy network connection will actually have the same packages, due to the possibility of different choices being made on install, and such. That said, what you could do is run apt list --installed on the target machine, get the list back to the connected machine, and exploit The Power Of diff to get what you want. – ChemicalRascal May 26 '18 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.