1
0
This repository has been archived on 2025-03-31. You can view files and clone it, but cannot push or open issues or pull requests.
wiki.mbirth.de/know-how/software/linux/_posts/2010-03-24-sync-package-list.md

1.0 KiB

created, layout, layout_old, redirect_to, tags, title, toc, updated
created layout layout_old redirect_to tags title toc updated
2010-03-23 17:53:30 +0100 redirect default https://blog.mbirth.de/archives/2010/03/23/sync-package-list-between-2-pcs.html
know-how
software
linux
administration
Sync Package List between 2 PCs false 2010-03-24 10:39:37 +0100

To export a list of all installed packages, you can use the following command:

sudo dpkg --get-selections > selections.txt

But this will loose any {A} markers for automatically installed packages and therefore produce a lot of garbage when dependencies change.

To export only manually installed packages, use aptitude like this:

sudo aptitude search '~i!~M' -F '%p install' > selections.txt

(More aptitude filterstrings can be found on their project page.)

On the other machine, use the following command to set the new markers:

sudo dpkg --set-selections < selections.txt

Now run aptitude and resolve the dependencies.