# PKG Informations



## OnlyRipper (Jul 4, 2019)

Hello everyone!
I come up with a new simple question that i don't know how to solve.
Is there a script that could print pkg infos(only the pkg name) inside a text file? 
I want to compare a32 bit with a 64 bit.It's difficult using puttywhen the system is having alot pkgs installed


----------



## Lamia (Jul 4, 2019)

pkg info -a >> list_installed_pkgs.txt

You can replace 'a' with 'aoq' or other attributes/options you know.


----------



## T-Daemon (Jul 4, 2019)

Sorry to intervene.


Lamia said:


> pkg info -a >> list_installed_pkgs.txt


That would print the package names with comments. OP wants only the package names.

`pkg info -q > list_installed_pkgs.txt` is the needed command. More options with `pkg help info`.


Lamia said:


> You can replace 'a' with 'aoq' or other attributes/options you know.


`pkg info -aoq` would print 'package origin/package name', no version numbers.


----------



## SirDice (Jul 4, 2019)

You might want to look at the output from `pkg leaf`. Those are the important packages, everything else is a dependency.


----------



## OnlyRipper (Jul 4, 2019)

THank you all for you replies!
I will test every command and see what it does and what's the output.
How can you all handle all these informations? I mean there are alot commands.


----------



## T-Daemon (Jul 5, 2019)

OnlyRipper said:


> How can you all handle all these informations? I mean there are alot commands.



I would say reading man pages, reading the forum, reading various FreeBSD related web sites, executing command help function, trying out, experience.
i.e. for pkg(8) execute:

`pkg help`
`pkg help info`
`pkg alias` (for leaf command SirDice suggested )
`pkg help alias`


----------



## SirDice (Jul 5, 2019)

OnlyRipper said:


> How can you all handle all these informations? I mean there are a lot commands.


That's experience. And having used those commands a lot. Things will eventually 'stick' if you use them often enough.


----------

