This is, of course, in the context of setting up a new system (*) and you want to install on the new system all the packages you had installed on the old one.
My question is: What is the best way to do this? I am aware of two and there are probably many others. The two that I am aware of are:
1) apt list --installed
and
2) dpkg something --get-selections
or something like that. I can never remember the exact incantation.
So, obviously, of these two, the first looks simpler and easier to remember, but it seems like the second one is the one more often recommended on this board. In particular, it is part of the periodic "How to upgrade <preveriousVersion> to <CurrentVersion> - even though we don't recommend it - posts that you see on this particular sub-forum.
Final note: What would really be nice is a way to tell all the packages that *YOU* installed, as opposed to those that "came with" the system. And, yes, I am well aware that the best way to handle this is with fore-thought - that is, to keep track of it from the beginning - but of course, if you did that, well, you wouldn't be asking the question. The ideas that I've advanced in other threads about how to keep the log rotator from removing old apt history.log files actually go quite a ways towards helping the situation.
Footnote:
(*) Usually this is one of either a) The old system crashed and you are re-creating it or b) A new version of RaspiOS just came out and you want to use that latest version.
My question is: What is the best way to do this? I am aware of two and there are probably many others. The two that I am aware of are:
1) apt list --installed
and
2) dpkg something --get-selections
or something like that. I can never remember the exact incantation.
So, obviously, of these two, the first looks simpler and easier to remember, but it seems like the second one is the one more often recommended on this board. In particular, it is part of the periodic "How to upgrade <preveriousVersion> to <CurrentVersion> - even though we don't recommend it - posts that you see on this particular sub-forum.
Final note: What would really be nice is a way to tell all the packages that *YOU* installed, as opposed to those that "came with" the system. And, yes, I am well aware that the best way to handle this is with fore-thought - that is, to keep track of it from the beginning - but of course, if you did that, well, you wouldn't be asking the question. The ideas that I've advanced in other threads about how to keep the log rotator from removing old apt history.log files actually go quite a ways towards helping the situation.
Footnote:
(*) Usually this is one of either a) The old system crashed and you are re-creating it or b) A new version of RaspiOS just came out and you want to use that latest version.
Statistics: Posted by BigRedMailbox — Fri Jan 30, 2026 2:10 pm