I have some really old systems (like prehistoric in gentoo timescale) and I would like make binary packages there, but I do not have all the sources for normal compilation, as it was deleted from web many years ago.

Is there way to make binary packages from what I have already installed (even at the risk of changed configs, missing/modified files and so)?

I would like to create "snapshot" of the system at current state, then try update something here and there and if it went wrong, reinstall it from that packages. I understand, that such packages have nearly no meaning on other computers, or after some larger changes in make.conf/USE etc. etc., but anyway ... is there way to somehow extract actual files from living system, make binary package from it and reinstall it later other, than manually copy everything to other tree, zip that tree and in case of emergency just unzip the tree and copy it back?

  • 1
    Please don't add "solved" etc. to the title. Marking an answer as accepted is enough.
    – muru
    Nov 9, 2017 at 4:48
  • There are a few very common solutions for your problem: a) Virtual Machine with Gentoo, that supports snapshots. b) Prepare a chroot for your test system. c) btrfs snapshots (very common in the gentoo world). I did not write this to an answer, because you asked for binary packages. Jan 2, 2019 at 20:08

1 Answer 1


The quickpkg command that comes with portage can take a package atom that corresponds to an installed package and generate a binary package for it. For example:

$ sudo quickpkg sys-devel/gcc
 * Building package for sys-devel/gcc-5.4.0-r3 ...                         [ ok ]

 * Packages now in '/usr/portage/packages':
 * sys-devel/gcc-5.4.0-r3: 53.9M

That command produced /usr/portage/packages/sys-devel/gcc-5.4.0-r3.tbz2.

  • Thank you very much, that is exactly, what I had on mind :)
    – gilhad
    Nov 9, 2017 at 4:45

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.