Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 May 2011 19:09:41 +0200
From:      Polytropon <>
To:        Antonio Olivares <>
Cc:        FreeBSD Questions <>
Subject:   Re: Does running ``# portupgrade -arRp '' prompt for options or updates everything without prompts?
Message-ID:  <>
In-Reply-To: <>
References:  <> <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Fri, 6 May 2011 11:36:07 -0500, Antonio Olivares <> wrote:
> This is what I am running now ATM
> # cd /usr/ports/
> # make clean build deinstall install
> Will it install all the ports?   or only the ones that are installed?

Oh, I've never tried that... "install all ports"... I even
doubt this is possible.

If you want to intendedly deinstall all _except_ the OS
software, you can do this:

	# cd /usr/local
	# rm -rf *
	# mtree < /etc/mtree/BSD.local.dist

It's worth mentioning that this is a very hard method.
Maybe it's much better if you utilize the ports infra-

	# cd /var/db/pkg
	# pkg_delete -fad


	# pkg_delete -f *

This should remove all ports in a clean way. You can also
remove stuff from /usr/ports/distfiles and /usr/ports/packages.

Then make sure you have updated your ports tree. In case
you also want an OS update, do it _now_ (i. e. prior to
dealing with ports).

In case you keep using portupgrade (and therefore portinstall),
maybe in combination with pkg_add -r if you prefer - like
me :-) - installing binary packages, make sure that you
run BEFORE and AFTER each "big step", just to be sure

	# pkgdb -aF

This keeps portinstall's own database in sync with what
you are doing on your system with other tools. Oh, and you
can _still_ use "make install" like installations directly
from the ports tree - no problem.

Another "secret": Start with installing one of the bigger
software packages you need, as this will pull in many of
the dependencies, and you don't have to install those
first, by hand. If you want to compile, use gmencoder
for example, and select all options you need (remember
to do "make config-recursive" before "make install").

Sometimes, you'll find it's easier to begin with a new
software installation from scratch. Maybe this is a good
moment to do so. :-)

And a sidenote:

If you intend to use the packages you've build on a
different system (to install them there), use "make package",
or much easier with portupgrade or portinstall: use
the -p option. This will place precompiled (haha)
binary packages in /usr/ports/packages that you can
transfer to another system and install with them
with pkg_add there - VERY handy solution!

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

Want to link to this message? Use this URL: <>