Create account Login Webmail Contact Us



 
Knowledgebase
How to use portupgrade.
Posted by Mike C. on 11 September 2009 09:35 PM
One of the coolest tools FreeBSD has to offer is ports and portupgrade. In order to use portupgrade you will need to install it from ports. So first upgrade your ports and install portupgrade in /usr/ports/sysutils/portupgrade. To upgrade ports refer to my artcile on "How to upgrade ports." After you do this type "cd /usr/ports/sysutils/portupgrade ; make install" This will initiate the installation of portupgrade. When this is done you can upgrade all your installed ports on the system. If this is a new install you might not be upgrading much but you can start the program anyway to see how it works.

There are two basic ways to upgrade ports. You can either type "portupgrade -a" to upgrade all your ports on the system. You might get some errors and you will have to look in to those when they come up. Another way to upgrade ports is to upgrade them one at a time. This is the way I prefer when there are not that many to upgrade. You can check to see which ports need to be upgraded by typing "pkg_version" and it will list all installed ports and it will show a "<" if the version in ports is higher than the installed version. You will need to upgrade these ports. An "=" sign means that the ports version is the same as the installed version. These don't need to be upgraded. When you find a package that needs to be upgrade you can simple type "portupgrade -Rr package" This will get the job done and all of its dependencies. So if the package you are upgrading has some dependencies that need to be upgraded those will be upgraded automatically.

Again, there might be some unexpected errors with doing this but do NOT worry. This is perfectly normal and it usually tells you to "make deinstall ; make reinstall" the port in question. If you are comfortable enough with what you are doing you can do what it suggests. If you are uncomfortable about it, seek professional help.
(446 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments: