Reinstallation of packages from a list
Last modified on July 24, 2026 • 1 min read • 206 wordsIf I install a new computer for myself (or if I do a fresh reinstall on an old machine), I want the computer have the software I am used to.
dpkg --get-selections > installed-packages.lstdpkg --set-selections < installed-packages.lstdselectHowever, this creates big problems, because the list contains ALL packages including those that are hardware-specific. Actually you are only interested in the user-installed software. For reloading the software onto the same (or an identical) machine, this command works fine, but what if you want to use KDE instead of Gnome on the new computer? You still want to use the same programs, but the commands above will wreak havoc and may even break your desktop experience. Unfortunately I have not found anything better, but to open the text file generated with dpkg and to manually erase all lines that do not contain user-installed software (which is most of them).