# [resolved]what the good way to upgrade applications?



## pierre (Oct 13, 2014)

I have upgraded all applications using `pkg upgrade`. I guess I did wrong because some of them were installed using the ports. So, is it mandatory or more safe to run `portupgrade` to upgrade software that have been built from the source? Is it mandatory or more safe to run `pkg upgrade` for package?

Thanks,
Pierre


----------



## jb_fvwm2 (Oct 14, 2014)

*Re: what the good way to upgrade applications?*



			
				pierre said:
			
		

> I have upgraded all applications using `pkg upgrade`.
> I guess I did wrong because some of them were installed using the ports.
> So, is it mandatory or more safe to run `portupgrade` to upgrade software that have been build from the source?
> Is it mandatory or more safe to run `pkg upgrade` for package?
> ...



Still learning here.
I `pkg install` some from the lists `pkg upgrade` produces -- not all at once, so far.  But one should pay close attention, for instance the default ruby19 is now ruby20.   It may be useful  to sort of "juggle" the mix of (after reading UPDATING ) ... `pkg upgrade; pkg install; portupgrade` and eventually `portmaster` although I use a small portmaster-alike script sometimes for convenience.   No way (I can think of to write about) is really mandatory, but there are somewhat-mandatory caveats which may vary from port to port one should be aware of. 
There is another answer to supply, but I've not investigated it so far.  

BTW today pkg-devel fixed a bug that was not so trivial, from the limited testing I've done with it.  [ I've another thread where I detail how to reinstall pkg after deinstalling, on v9...  somewhat tricky if one has not done so already. ]


----------



## wblock@ (Oct 14, 2014)

*Re: what the good way to upgrade applications?*

If you want to use ports, here is the procedure I use: Upgrading FreeBSD Ports.  It uses ports-mgmt/portmaster, which I recommend over ports-mgmt/portupgrade.


----------



## SirDice (Oct 14, 2014)

*Re: what the good way to upgrade applications?*



			
				pierre said:
			
		

> I have upgraded all applications using `pkg upgrade`.
> I guess I did wrong because some of them were installed using the ports.


There is no difference between ports and packages once they are installed. A port is used to create a package. Packages are simply pre-compiled ports. The only difference comes from adding or removing options of a port. The 'official' packages are always built using the default options.


----------



## pierre (Oct 14, 2014)

*Re: what the good way to upgrade applications?*

These posts have definitly upgraded my view of port upgrading!
Thanks.
I asked this question because to make my scanner working (a HP Photosmart-all in one and whatever) HPLIP must be built with some options, that's what i had done. But hplipwas included in the upgrading with `pkg upgrade`. The library hpaio is now missing, the scanner does not work. I have to re-buid hplip, a hard task.


----------

