# pkg prime-list install packages on another machine ?



## NapoleonWils0n (Mar 20, 2020)

Hi 

My Macmini running catalina died so i installed Freebsd on it, 
and now i want to copy a list of packages installed on my Macbook air running freebsd to the macmini

Should i use pkg prime-list to generate a list of the packages i installed on the macbook air,
prime-list just creates a list of package you have installed and not any dependencies


```
pkg prime-list > pkg-prime-list.txt
```

or should i use pkg info which lists the packages installed and the dependencies


```
pkg info > ~/Desktop/pkg-list.txt
```

Then i can use netcat to transfer to text file to the macmini

How do you use pkg to install the packages from the text file,
i had a look through the man page, maybe i missing something

is there a pkg option i missing that allows you to specify a file to install packages from,
or do you have to cat the text file and pipe it into pkg


----------



## T-Daemon (Mar 20, 2020)

After running `pkg prime-list > pkg-prime-list`, run `pkg install `cat pkg-prime-list`` on the other machine. Dependencies are pulled in, no need to care of. I've done it myself a few times.


----------



## NapoleonWils0n (Mar 20, 2020)

Thanks mate

ran into an issue the drm-stable-kmod package isnt in the repositories

should i install drm-fbsd12.0-kmod-4.16.g20200221 or the drm-kmod metaport

pkg search drm-


```
drm-fbsd12.0-kmod-4.16.g20200221 DRM modules for the linuxkpi-based KMS components
drm-kmod-g20190710             Metaport of DRM modules for the linuxkpi-based KMS components
drm-legacy-kmod-g20200306      Legacy DRM modules for the linuxkpi-based KMS components
```

trying drm-kmod metaport
installing the pkg list with cat works fine


----------



## ShelLuser (Mar 20, 2020)

I'd simply run `pkg info -qoa`. Gets you a list in a very practical format which you can feed directly into either a shell script or ports-mgmt/portmaster (= my personal favorite). Makes it really easy to re-install.


----------

