# Error: cannot read index file "/usr/ports/INDEX-11"



## runix (Dec 29, 2018)

Folks,

I upgraded my box from FreeBSD 11.2 to 12.0. But upon rebooting, and typing
`freebsd-version` I get `12.0-RELEASE-p1` but when I type `uname -mrs` it says, [/CMD]FreeBSD 11.2-RELEASE-p7 amd64[/CMD]. When I try to `psearch` I get this error.

```
Error: cannot read index file "/usr/ports/INDEX-11"
```

I followed the instructions up here.

Could somone shed some light on what am I missing or my mistake?


----------



## tingo (Dec 30, 2018)

Well, you have upgraded FreeBSD, the operating system. The ports system is separate from the operating system. Have you done anything to it?
normally you would use `# portsnap fetch` and `# portsnap update` (or `# portsnap extract` if this is a new partition, ie. empty /usr/ports)
Using a INDEX-11 file with FreeBSD 12.x seems wrong, I'm guessing it should be INDEX-12. Perhaps a `# portsnap update` will fix that, if you have an existing ports tree in /usr/ports. Note: I haven't tested it, YMMV.


----------



## SirDice (Dec 31, 2018)

runix said:


> and typing
> freebsd-version I get  12.0-RELEASE-p1 but when I type  uname -mrs it says, [/CMD]FreeBSD 11.2-RELEASE-p7 amd64[/CMD].


You haven't rebooted yet?


----------

