# best way to upgrade packages



## TCE (Feb 23, 2010)

I am a new FreeBsd user, and been using linux for about 3 years.  I was wondering what is the best way to upgrade all packages. Read alot of howtos, but there is so many different ways I start to get confused


----------



## sixtydoses (Feb 23, 2010)

Guess the most popular tools are `portupgrade` and `portmaster`.

This may provide you with a little hint of those 2 tools, if not much http://forums.freebsd.org/showthread.php?t=6078


----------



## DutchDaemon (Feb 23, 2010)

Be aware of the difference between ports and packages. If you have a package-only system (pretty rare around here), use the script in the sysutils/bsdadminscripts port/package [sic].


----------



## TCE (Feb 23, 2010)

Thank you for your help.  I was using portupgrade already, but was just making sure it was the best option.


----------



## DutchDaemon (Feb 23, 2010)

You'll find that a lot of people here will say that about portmaster, actually


----------



## SageRaven (Feb 23, 2010)

DutchDaemon said:
			
		

> You'll find that a lot of people here will say that about portmaster, actually



While that may be true for day-to-day port management, I've found portmaster to be a major pain when updating all (or a large portion) of one's ports.  At least portupgrade will continue to chug along if a build fails, whereas portmaster will gleefully come to a halt at the first sign of trouble (often, immediately after you've left the console, expecting your rebuild to be working for the next couple of hours unattended).

Of course, I may just be unaware of a magic flag that tells portmaster to ignore errors.


----------



## TCE (Feb 24, 2010)

Thank you for your suggestions. I will give both a try.


----------



## fronclynne (Feb 24, 2010)

SageRaven said:
			
		

> While that may be true for day-to-day port management, I've found portmaster to be a major pain when updating all (or a large portion) of one's ports.  At least portupgrade will continue to chug along if a build fails, whereas portmaster will gleefully come to a halt at the first sign of trouble (often, immediately after you've left the console, expecting your rebuild to be working for the next couple of hours unattended).
> 
> Of course, I may just be unaware of a magic flag that tells portmaster to ignore errors.



I haven't found one for that; but the one that bugs me is that there seems to be no portmaster equivalent to `# portupgrade -fR foo-8.6.7` which can be quite useful in the case of one misbehaving port.


----------



## atomicplayboy (Feb 24, 2010)

`# portmaster -f foo-8.6.7` will recursively rebuild all dependencies of foo-8.6.7. `# portmaster -r foo-8.6.7` will recursively rebuild all ports depending on foo-8.6.7. Without any flags, portmaster will always rebuild the port you specify after upgrading any dependencies that are out of date. It's a little different from how portupgrade works, but the results are the same.


----------

