# FreeBSD updating locally



## bsaidus (Feb 28, 2013)

Hello every one.
Because I have not internet at home, I have downloaded at work from the ftp site of FreeBSD the stable ports folder (for versions 7.4 & 8.3-about 36 GB each). So I'm wondering how to point or change pkg_add(1) or pkg_updating(1) to read from local repos or dvd or from the location where I've previously downloaded packs.
Thanks in advance.


----------



## SirDice (Feb 28, 2013)

If you use pkg_add(1) _without_ the -r option it will install from a local source.


----------



## bsaidus (Feb 28, 2013)

Yes I know but it will not update the system.
For exemple I want to install apache from he stable folder (dvd that I download) and it wonts cause there is many dependencies that are instaled but versions are not adequate


----------



## Beastie (Feb 28, 2013)

If you want to install/upgrade locally exclusively, the easiest and cleanest way is to just reinstall everything from scratch.
Since you already have the STABLE packages and their dependencies it should be very easy. Just make sure you backup any file you've modified.

`# rm -R /var/db/pkg/*`
`# rm -R /usr/local/*`
`# pkg_add apache22-2.2.23.tbz`
`# pkg_add php5-5.4.7.tbz`


----------



## kpa (Mar 1, 2013)

pkg_upgrade(1) from sysutils/bsdadminscripts may be of help.


----------



## bsaidus (Mar 1, 2013)

Thank you friends. I ewill do it


----------



## bsaidus (Mar 1, 2013)

It works well  .
It means that all ports packages installs under /usr/local directory


----------

