$ dpkg --get-selections | awk '$NF == "install"{print $1}' > list_of_packages.txt The "dpkg --get-selections" lists all of the packages, then the "awk" portion filters it to those that are currently installed, and prints the package-name. The results can be dumped to the screen, sent to a file (as above) or piped to "less" for review, whichever you prefer. -tim On 2024-07-15 17:53, Karen Lewellen wrote: > Hi Tim, > the goal would indeed be currently installed packages, seems to be Debian, > as dpkg seems to be here. > may I have the command for installed packages again? > here it starts with dkg, and I want to be sure this is not a typo. > > > > On Mon, 15 Jul 2024, Tim Chase wrote: > > >>>If the server is running an RPM-based distribution, then rpm -qa, but it > >>>will likely print out a list of thousands of packages > >> > >>Is there a way to copy output into a file? > > > >The usual Unix way: > > > > $ rpm -qa > list_of_packages.txt > > > >and you can then review "list_of_packages.txt" as you see fit. > > > >If it's a Debian-based system, you can use "dpkg" to obtain similar > >info: > > > > $ dpkg --get-selections > list_of_packages.txt > > > >which will include all installed and installed-but-then-uninstalled > >packages. If you only want the currently-installed packages, you > >can use > > > > $ dpkg --get-selections | awk '$NF == "install"{print $1}' > list_of_packages.txt > > > >-tim > > > > > > > > > > > To unsubscribe from this group and stop receiving emails from it, send an email to blinux-list+unsubscribe@xxxxxxxxxx.