# Downloading pkgs to specified directory, with all dependencies



## fishfox (Mar 9, 2019)

Hi all,

I am working with NanoBSD which requires me to pre-download pkgs, along with all their installation.

I have tried using the portupgrade port with this config: `portupgrade -F -PP -R -v -f pkg` but I can't seem to figure out where to retrieve anything.

What is the best way to download a port, with all its dependencies, to a specific folder?

Thanks!


----------



## ucomp (Mar 9, 2019)

fishfox said:


> ..What is the best way to download a port, with all its dependencies, to a specific folder?...



svn


----------



## Bobi B. (Mar 9, 2019)

See pkg-fetch(8): `pkg fetch --dependencies --output $PWD/out mc-light`. Use `env ASSUME_ALWAYS_YES=yes pkg fetch ...` if you want to make it unattended.


----------

