Forcing port reinstalls without rebuilding over and over again

Gary Aitken freebsd at
Thu Dec 13 05:52:36 UTC 2018

On 12/12/18 4:14 PM, Paul Schmehl wrote:
> --On December 12, 2018 at 2:42:00 PM -0700 Gary Aitken <freebsd at> wrote:
>> On 12/12/18 1:47 PM, Polytropon wrote:
>>> In my opinion, it's a little better to create your own
>>> "top ports list" instead of saving the current state (or
>>> at least have both lists at hand, but only use your own).
>>> In that "top ports list", you list the things you actually
>>> want to use, and you do not care about their depencencies,
>>> simply because portmaster can resolve them on its own. So
>>> first, your list is much more readable (as it will only
>>> contain the software you are interested in, and nothing
>>> of the software you might need to build or run them), and
>>> second, your list will be much more portable and also deal
>>> with the "port not needed, but still installed" problem
>>> described above.
>> That is the way I've done it in the past, using -R -d, and doing so
>> does not rebuild dependencies.  I suspect the problem has something
>> to do with -a.
> Well, you kind of need that if you're going to rebuild all ports.

No, you don't.  All you need are the top level ports.  Right now I
have 800 ports installed.  To get those, I only install 36.  I agree
it's a bit of a hassle to keep track of what you need.  On the other
hand, it seems a bit lame to not know why you have the things you
have installed actually installed.  Keeping track is a good idea, as
it forces you to review what you have installed and why; I find I quit
installing some things after a while.  I may no longer be working on a
project that requires some stuff, for example.  Or some things may be
installed to overcome a particular one-time or seldom-encountered problem.
I had three or four different pdf viewers installed at one time.  I only
use one of them in general.  The others were each installed for a
specific purpose when the one I generally use was inadequate.  But when
I upgrade I only install the one I normally use.  If at some point I
actually need the others, I'll install them.  The same goes for various
audio programs.

Keeping track also (unfortunately?), means you sometimes can cut down the
top level list, as higher-level ports tend to drag in more stuff over the
years.  e.g. I used to have to install cups and three or four other things,
but (in my case) they come in automatically now.

What I find particularly difficult, however, is keeping track of options.
Some ports have NLS by default, some have EXAMPLES by default, some have
various GUI options by default.  NLS is fairly easy to get rid of, but
the gui options are not.  And the 5 word hint in the options dialog is
usually totally inadequate to determine if you want (or need) the option
enabled.  It would be really helpful if there was a button you could hit
to give you more detailed info about what each option is for; kind of a
pkg-descr for the option, explaining when you want it and when you don't.


More information about the freebsd-questions mailing list