# Updating to new package versions



## padenom (Jan 5, 2009)

Hello all,

First things first, I want to let the readers know that I'm a noob with the FreeBSD system. I have installed FreeBSD on my machine (dual-boot) with Debian Sid being my main OS of choice. The reason for FreeBSD was mainly to play around with BSD and learn to use it too.

After the installation of 7.0-RELEASE (which was done a few months ago), I setup GRUB to have an entry for it. More recently, during the holidays, I was searching on how to upgrade the packages installed on the system. When I found out how to do the security updates, I saw the message (during the update) that my 7.0 was nearing its EOL so I should upgrade my system.

The next step after security updates was upgrading the base system to 7.1-RC2. That went pretty fine except for the fact that the default mirrors gave crappy download speeds x(

Now, at this point I want to upgrade the packages to their latest versions. I know how to use pkg_add to install a binary package, but I have not been able to find a way to upgrade e.g. Firefox from 2.0.0.12 to a 3.x version. The only way that I been able to find it via the ports system which builds from source. 

Taking into consideration that I'm not using the system as my primary one and don't want to wait for more than half an hour so that the system can compile Firefox for me, _is there a way to get the new binary versions of the installed packages e.g. Firefox, Gnome, Epiphany, etc._ I don't expect the bleeding edge versions of the packages that I have in Debian Sid, but still something more recent than e.g. Firefox 2.0.0.12 would be great.


----------



## graudeejs (Jan 5, 2009)

find firefox3 package on ftp server and
here's example how i would do this with my local mirror
*pkg_add ftp://ftp.linux.edu.lv/mirrors/ftp..../7.1-RELEASE/packages/www/firefox-3.0.5,1.tbz*

[haven't used pkg_add for long time, you might need to use -r switch]
then to use it you need to launch firefox3

use
pkg_version -vs firefox
to find firefox2 exact version
and then you can use pkg_delete to remove firefox2


----------



## padenom (Jan 5, 2009)

So that means I will have to install all the packages myself manually, one-by-one? That wouldn't be an efficient way to upgrade the packages.

Any other suggestions?


----------



## cajunman4life (Jan 5, 2009)

The best way it to update everything from the ports tree using portmaster or some other port management tool. But you've already ruled that out. Unfortunately I have no experience with packages, so I can't help you there, only to throw my $0.02 in to support the ports.


----------



## Lowell (Jan 5, 2009)

padenom said:
			
		

> So that means I will have to install all the packages myself manually, one-by-one? That wouldn't be an efficient way to upgrade the packages.
> 
> Any other suggestions?


There are a bunch of tools in ports that will do this for you.  The most widely used is portupgrade, but there are several others.  This is covered in the FreeBSD Handbook, which is probably installed on your disk already.

Such utilities are found in the ports-mgmt group in ports; i.e., /usr/ports/ports-mgmt.


----------



## ale (Jan 6, 2009)

Anyway keep in mind that packages are built from ports at a certain date (that should be) near to  a new Release of the OS and in some other particular cases, like a new version of xorg which has a lot of dependencies etc.
So if you are using ports and, let's say, firefox get updated from 3.0.4 to 3.0.5 this doesn't mean that you will find a 3.0.5 package.
And also, from firefox-2.X to firefox-3.X is not technically an upgrade as they can coexists as they are two separate ports www/firefox and www/firefox3.


----------



## kamikaze (Jan 6, 2009)

For package upgrades portupgrade is still the best tool.

`# portupgrade -Pa` will upgrade all your packages and build those missing in the latest version from the ports tree. `# portupgrade -PPa` will upgrade only when packages are available.


----------



## DutchDaemon (Jan 6, 2009)

Don't underestimate how frequently packages get built. I usually don't have to wait more than 2-3 weeks for new/updated ports to become available as packages (on -STABLE anyway). I just wish portupgrade -aPP would include an option *not* to download the latest available package every time I'm trying to update and the newest version of the port is not yet available as a package. Some packages are 35 MB or more, and if you don't pay attention portupgrade -aPP will happily download those and tell you that they're the same version as you already have.


----------



## hedwards (Jan 6, 2009)

DutchDaemon said:
			
		

> Don't underestimate how frequently packages get built. I usually don't have to wait more than 2-3 weeks for new/updated ports to become available as packages (on -STABLE anyway).


But still, that's 2-3 weeks, even on an ancient system compiling the ports is going to beat that by weeks. And you're still stuck with using the default settings.

Personally, I like doing a portmaster -Dga and knowing it's handled.


----------



## alvaro (Feb 1, 2011)

I had the very same concern and tried everything: *pkg_fetch*, *portupgrade -PP*, *portsnap*, but lately I found a forum where they suggest using sysutils/bsdadminscripts, now I'm trying it, the man page looks promising.


----------

