# How to downgrade a package



## andrewm659 (Jul 15, 2015)

So I'm using FreeBSD 10.1 and I'm running into problems with newer versions of lang/expect.  I need to go to 5.40.  How would I do that?

Check for package
/var/cache/pkg

`pkg check -d`

`pkg check -B`

`pkg install SpecificPackageversion`


----------



## junovitch@ (Jul 15, 2015)

The ports(7) tree only supports upgrades as a whole right now.  It's possible to get away with installing an old version from /var/cache/pkg in some cases but based on what dependencies have change it could have side effects.

In this case, 5.40 of lang/expect would have been over a decade ago.  The port skipped from 5.38 to 5.42 in 2004.  That is so far off from an officially supported configuration that if you absolutely must do so that copying the current expect port to another name, modifying it per your needs, and maintaining it locally would be the only way to do so.  You would be far better off identifying what your issues are and resolving them with the current version of the port then pushing off addressing the problem even further into the future.


----------



## andrewm659 (Jul 15, 2015)

Hmmm....yeah.  The problem is with Rancid 2.3.8.  I'm working on moving to rancid 3.x


----------

