# Scanpackages



## karasamur (Aug 20, 2022)

Hello. What should I do to install the packages that I downloaded and collected in a directory on the computer with the Internet, on another computer without the Internet. I could not succeed with the methods in the forums. The event with the "dpkg-scanpackages" command in Debian. It would be greatly appreciated if you could make a simple user-friendly interface/program like Debian/synaptic. Thank you and good luck.


----------



## bsduck (Sep 14, 2022)

Hello and welcome,

You can install local packages with `pkg add`.

To install a single package: `pkg add yourpackage.pkg`

To install all packages in your directory in one shot: `pkg add yourdirectory/*`


----------



## kpedersen (Sep 15, 2022)

Indeed, it is actually easier with FreeBSD's pkg system in that you don't need to create a Packages.gz index file for all the metadata unlike in apt or dnf. You just `pkg add <package>` and it will install the package, including any dependencies found in the same directory.


----------



## karasamur (Sep 29, 2022)

I tried this. But failed.
Thanks


----------



## W.hâ/t (Sep 29, 2022)

You usually want to use pkg-install(8) as it checks and install deps.
Check pkg.conf(8) and pkg-repo(8) if you want to configure a local repo.


----------



## SirDice (Sep 29, 2022)

W.hâ/t said:


> You usually want to use pkg-install(8) as it checks and install deps.


pkg-add(8) does too. The only big difference between pkg-install(8) and pkg-add(8) is that the latter installs a _local_ package.


----------



## W.hâ/t (Sep 29, 2022)

SirDice said:


> pkg-add(8) does too. The only big difference between pkg-install(8) and pkg-add(8) is that the latter installs a _local_ package.


I must have misconfigured something then. I had some issues with pkg-add(8) and dependencies.


----------



## SirDice (Sep 29, 2022)

W.hâ/t said:


> I must have misconfigured something then. I had some issues with pkg-add(8) and dependencies.




```
If	this is	a regular file,	and the	package	to be installed	has unmet de-
     pendencies, pkg add will search the directory containing pkg-name for
     suitable pkg archive files	to fulfill those dependencies.
```


----------



## SirDice (Sep 29, 2022)

karasamur said:


> I tried this. But failed.


Do we have to guess what happened? "It doesn't work", or something to that extend doesn't give us much to go on. Explain what you did, which errors you got and what exactly happened (or didn't happen).


----------



## W.hâ/t (Sep 29, 2022)

I don't recall exactly how I manage to do that. It was a few years ago tho.
I think i just copied some of the pkg!! Yeah that's right I didn't have the dependencies...  Oops


----------

