# updating apps in FreeBSD 8.2 please advice.



## TroN-0074 (Feb 12, 2012)

Ok, so for some reason I can't upgrade the whole system, and I am willing to live with it. But what is bugging me is having to use firefox 3.6.13, knowing that the latest release is 10.0. So can somebody please show me how to upgrade firefox version? I had already tried 
	
	



```
# portupgrade -R firefox
```
 The command reported that it was done but when I re started firefox the same old version came up.

I will appreciate all advices.


----------



## Beastie (Feb 12, 2012)

How up-to-date is the rest of your applications?

How about doing a *pkg_delete -a* (OPTIONAL) then *rm -r* on /usr/local and /var/db/pkg and then reinstalling everything from a 8-STABLE repository?


----------



## jrm@ (Feb 12, 2012)

Did you successfully update your ports tree?  I ask because you mentioned you were having trouble in another post.


----------



## TroN-0074 (Feb 12, 2012)

Thank you for the repl*ie*s. I haven*'*t been able to update anything. So I have the whole system the way it was when I first install*ed* it. So none of my applications are updated, I thought about removing everything and then install*ing* everything back but it will be quite painful. I also thought about an upgrade to 9.0-REL and then deal with the upgrades but I am afraid that upgrading version will break some of the settings in my system.

Because compiling from ports takes too long I have installed everyting with the command 
	
	



```
pkg_add -r
```

I will appreciate more advices.


----------



## ericbsd (Feb 12, 2012)

Simple deinstall and reinstall.

```
cd /usr/ports/www/firefox && make deinstall clean && make reinstall clean
```

To update all application. 

```
portupgrade -a
```

One thing If you don't have update your ports you need to do it first.

```
portsnap fetch  extract
```
if you have done it ones do 

```
portsnap fetch  update
```


----------



## francis (Feb 12, 2012)

Hi *TroN-0074*! You wrote, that you are having problems with the system upgrade, but first let's get update Firefox. One way is update the ports collection using portsnap(8) tool[1]. Next, get to the Firefox directory (/usr/ports/www/fireox) and compile the latest version[2]. In my case, FreeBSD 8.2-RELEASE with 1 GB of RAM, dual-core processor, and OPTIMIZED_CFLAGS enabled, the build process takes about 40 minutes. 

When it comes to the whole system, you can use the pkg_upgrade tool[3] contained in sysutils/bsdadminscripts package. In this case, if you use the RELEASE version, you must export the path for the STABLE branch (see Setting PACKAGESITE). 

Setting PACKAGESITE with the export or setenv, dissapear with the end of the current task. To avoid it, you could set this e.g. in the /etc/cshrc.login file for *csh* shell or in the /etc/profile file for *bash* shell - if I remember correctly.

Please remember that there are many tools (e.g. sysutils/portmaster or ports-mgmt/portmanager) and opportunities to upgrade packages. Look e.g. here FreeBSD Package Management - Basics etc. I wrote only one of the possibilities of which I sometimes use! Maybe someone else will describe better one. And one more thing! Before upgrade ports or whatever, please read /usr/ports/UPDATING file, which describes various issues and additional steps for update process.

Please correct me if I made a mistake in some place.  Best regards! 

_______________________
[1] Update ports collection. See also Portsnap: A Ports Collection Update Tool
`# portsnap update`

[2] Compile latest Firefox (OPTIMIZED_CFLAGS may require more than 1GB of RAM)
`# cd /usr/ports/www/firefox`
`# make config    [i][color="DimGray"]change OPTIMIZED_CFLAGS=off to on. Not needed[/color][/i]`
`# make deinstall reinstall clean`

[3] Install bsdadminscripts, set STABLE branch (note the architecture!) and update all packages
`#  pkg_add -r bsdadminscripts`
`#  setenv PACKAGESITE [url]ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/Latest/[/url]`
`#  pkg_upgrade -a -C`


----------



## ericbsd (Feb 12, 2012)

Wow! Thanks francis! I learn something new today.


----------



## wblock@ (Feb 12, 2012)

Setting OPTIMIZED_CFLAGS in the Firefox port makes it take much longer to compile and may even exhaust memory and swap.  If Firefox is any slower without that, I've never noticed.


----------



## TroN-0074 (Feb 13, 2012)

Hi. Thank you for the helpful tips. It looks like my port collection is out of date so when I issued the command to compile firefox from ports it start*ed* compilling an old version. The thing is that compiling doesn*'*t get complete*d* because I get a device run out of space message and then the process stop*s*.

That is the same problem I get when I try to upgrade my port collection. When I first intalled FreeBSD I create*d* the following chart


```
/                1GB
/usr             8GB
/tmp             1GB
/var             1GB
/home            10GB 
swap             1GB
```
How can I free up space so I can upgrade my system*?* I was able to uni*n*stall firefox but when it was in the middle of reinstall*ing* it I ran out of space so it didn*'*t get complete*d*.

Thank you. I appreciate all advices.


----------



## jrm@ (Feb 13, 2012)

@TroN-0074, I responded to your other thread asking about freeing up space.  

http://forums.freebsd.org/showthread.php?p=166146#post166146


----------



## TroN-0074 (Feb 14, 2012)

Thank you good people from this Forum.
I apparently have my /var full of junk so the upgrade could not finish by default but it did once I issued the command 
	
	



```
# portsnap -d /home/user/documents fetch
# portsnap -d /home/user/documents extract
# portsnap -d /home/user/documents update
```
Once I had my port collections updated I issued (Thanks to jrm)

```
# find /var -type f -size +25M -exec du -m {} \; | sort -n
```

It turn out kdecache had some full length Chuck Norris movies I had been streaming over the network from my desktop so I deleted them from the cache directory, I still need to remove more garbage from there.
Then I issued the command (Thanks to francis)

```
# cd /usr/ports/www/firefox
# make config change OPTIMIZED_CFLAGS=off to on. Not needed
# make deinstall reinstall clean
```

Thanks to everybody else to replied to my question with tips, I still need to learn to keep my system lean and clean. As you can probably tell I am new to FreeBSD and I look forward to learn from you guys.


----------

