# pkgng database failure.



## wonslung (Nov 2, 2013)

I upgraded to the new pkgng system and somehow something went wrong installing a package.  I now have a malformed database and have no idea how to fix it.


```
[root@router /var/db/pkg]# pkg search curl
pkg: sqlite: database disk image is malformed (pkgdb.c:3069)
pkg: Unable to query repository
```

Any help would be greatly appreciated.


EDIT:  Sorry, i finally figured it out.



```
rm /var/db/pkg/repo-*
```

And then:


```
pkg2ng
```


----------

