Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • Users of apt might want to keep in mind that apt stores an additional flag marking packages which have been installed automatically to satisfy dependencies. The output of dpkg --get-selections does not contain this information so you wouldn't return to exactly the same state when restoring your dump from Git. See this answer for a way to only get a list of packages that have been explicitly installed by the user. Commented Jul 17, 2020 at 18:32
  • @Martin restoring only manually-installed packages probably won’t restore the same set of packages, because of changes in package relationships over time, and the differences in (default) handling of installations, upgrades and removals. The only way to get exactly the same state is to restore the full set of dpkg selections, and the markers. Commented Jul 17, 2020 at 18:48