Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8621

Raspberry Pi OS • Refresh my memory: What is the command to list all installed packages?

$
0
0
Refresh my memory: What is the command to list all installed packages?

I can't remember if it is an apt or apt-get or dpkg command.

The context is that I have a Pi system that has been running for many years on an old version of Raspbian/PiOS. Now, i need to move the system to a newer version of the OS, so I need to get a list of all the packages currently installed so I can know what to install on the new system once I get it up and running.

I've done this before, but it seems one has to more or less re-invent the process each time.

Also, what parameter (in APT) controls how many history.log* files are kept? The default value seems to be 13 (since there is history.log and history.log.N.gz for N=1 to 12, for a total of 13). 13 seems like an odd (unlucky) choice, but anyway... I'd like to set this to some large value (like 100).

The connection between these two points in this post is that I have 13 history.log files on the system in question - which gives me most (but not quite all!) of the packages that have been installed on the system throughout its history. It'd be nice (in future) to have them all - the next time this problem arises.

Statistics: Posted by BigRedMailbox — Sun Sep 28, 2025 1:55 am



Viewing all articles
Browse latest Browse all 8621

Trending Articles