# How to retrieve repo-FreeBSD.sqlite



## pierre (Oct 14, 2017)

I have not the /var/db/pkg/repo-FreeBSD.sqlite file.

i can't run `pkg update`, `pkg install`.
Is there any backup file as for /var/ldb/pkg/local.sqlite ?

Thanks


----------



## Deleted member 48958 (Oct 14, 2017)

pierre said:


> I have not the /var/db/pkg/repo-FreeBSD.sqlite file.
> 
> i can't run `pkg update`, `pkg install`.
> Is there any backup file as for /var/*db*/pkg/local.sqlite ?
> ...



If you deleted /var/db/pkg/repo-FreeBSD.sqlite, you can try to run `# pkg update -f`,
and it should be recreated. But if /var/db/pkg/local.sqlite was removed , then, it seems,
you removed your installed packages database, use /var/backups/pkg.sql.xz* to restore it,
using `# pkg backup`.


----------



## pierre (Oct 14, 2017)

I didn't delete repo-FreeBSD.sqlite. it disappeared.
`pkg update -f` doesn't work

```
Repository FreeBSD load error; acces repo file(/var/db/pkg/repo-FreeBSD.sqlite) failed: No such file or directory
Fetching meta.txz ...
Fetching packagesite.txz ....
pkg: http://pkg.FreeBSD.org/FreeBSD:11:i386/quarterly/packagesite.txz: Operations timed out
```


----------



## SirDice (Oct 16, 2017)

pierre said:


> ```
> pkg: http://pkg.FreeBSD.org/FreeBSD:11:i386/quarterly/packagesite.txz: Operations timed out
> ```


You seem to be having network issues that are preventing the system from fetching the package database.


----------



## pierre (Oct 18, 2017)

I have to say that it's a virtualbox vm.
I had enabled the bridged network mode. At this time ,the work around to fix the issue is to enable the NAT.
I created a new freebsd vm, that the same issue, I can't use pkg (update, install ...)with bridged mode enabled


----------

