# Reinstall packages after FreeBSD upgrade



## Peter2121 (Aug 8, 2019)

Hello,
I want to upgrade my server from 11.1 to 11.2. Normally after such upgrade I should reinstall all packages using `pkg upgrade -f`
The problem is that if I do it - the packages will be reinstalled _AND_ upgraded to the last versions existing in the repository. I have some packages which must not be upgraded. So I need just reinstall the existing packages without trying to upgrade them. I am sure that the existing packages work correctly on 11.2 (I have another server with the same versions).
How should I proceed?
What is the risque if I skip the step of reinstalling packages after upgrade?


----------



## SirDice (Aug 8, 2019)

Peter2121 said:


> I want to upgrade my server from 11.1 to 11.2.


Skip 11.2 and go to 11.3, 11.2 will be end-of-life in a month or two. 



Peter2121 said:


> Normally after such upgrade I should reinstall all packages using  pkg upgrade -f


Only required after a _major_ version upgrade, it should not be needed for a _minor_ version upgrade. Won't hurt though but should not be needed.


----------



## Peter2121 (Aug 8, 2019)

Thank you, *SirDice*, but anyway I'm curious to know if it is possible to reinstall all packages without upgrading 
And yes, I know, 11.2 will be EOL very soon, but I have dozen of servers on 11.2, I prefer to upgrade them to 11.3 all together later, when two last ones will be on 11.2 too


----------



## msplsh (Aug 8, 2019)

You probably can't re-fetch binaries of older versions of packages.  They simply won't exist on the repo.


----------



## SirDice (Aug 8, 2019)

Peter2121 said:


> I'm curious to know if it is possible to reinstall all packages without upgrading


There isn't, any pkg-install(8) or pkg-upgrade(8) command will always install the latest available version. 

If you have to maintain multiple servers and are trying to keep things more organized I can highly recommend setting up your own repositories. That will give you the ultimate control over updates, settings, and default versions.


----------

