# remove /var/db/portsnap/files/,INDEX error



## LaoLiulaoliu (Apr 13, 2009)

I removed all the file in /var/db/portsnap/files/.
When I come to /usr/ports to "make update".It removed a lot of sub directory under this directory,and an error came.
Now I "make update" in /usr/ports,the error is:
make: don't know how to make search. Stop
And "make clean" came the same error.

I run "portsnap fetch extract",the error is:

```
Fetching snapshot tag from portsnap.hshh.org... done.
Latest snapshot on server matches what we already have.
No updates needed.
Building new INDEX files... gunzip: can't stat: /var/db/portsnap/files/4954f84544ccd39dc4020f92ffbcb3b2508c59aa3c07d35a8315ce71a734f841.gz: No such file or directory
gunzip: can't stat: /var/db/portsnap/files/84a079aa4da0fbb430ed383304842f1dc77297c398c00f7951dbc4c6bdc627ee.gz: No such file or directory
gunzip: can't stat: /var/db/portsnap/files/3e9cc248eca240bf49e078022ead3a987cbc783740aa64f1c48c5351dd335892.gz: No such file or directory
done.
```

I would like to use portsdb to save my ports collection,but failed.

```
# portsdb -Uu
cd: can't cd to /usr/ports/ports-mgmt/portupgrade
Updating the ports index ... make: don't know how to make index. Stop
failed to generate INDEX!
portsdb: index generation error
```


----------



## DutchDaemon (Apr 13, 2009)

```
rm /var/db/portsnap/tag
rm -rf /var/db/portsnap/files
rm -rf /usr/ports
portsnap fetch extract
```


----------

