Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Dec 2015 15:03:36 +0000
From:      Matthew Seaman <>
Subject:   Re: Migrating to FreeBSD from Debian
Message-ID:  <>
In-Reply-To: <>
References:  <> <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

On 2015/12/07 14:23, Anton Sayetsky wrote:
> 2015-12-07 16:21 GMT+02:00 Malcolm Matalka <>:
>> Paul Stuffins <> writes:
>>> Hi Everybody,
>>> Over the last couple of years I have tried many times to dump Debian =
>>> move to FreeBSD, but every time I have succumbed to Debian's charms a=
nd not
>>> stuck with FreeBSD.
>>> One of my main frustrations is upgrading installed ports, on Debian I=
>>> need to run "sudo apt-get update && sudo apt-get upgrade", but I have=
>>> been able to work out how to upgrade installed ports.
>>> As 2016 is fast approaching I want to finally move to FreeBSD and sta=
y with
>>> FreeBSD, so my question is, what is the best or most efficient way of=

>>> upgrading all ports on a FreeBSD machine?

>> Use 'pkg' instead.  pkg update and pkg upgrade

> pkg will update _packages_, not ports.

=2E.. and a package is what you get by compiling a port.  Yes, there is a=

difference, but the two things are often conflated and it isn't worth
muddying the waters by insisting on exactingly precise terminology from
people new to FreeBSD.  It is clear enough what they mean -- their aim
is to get some software installed or upgraded.

To the OP: try using pkg(8).  You can use the default FreeBSD
repositories pretty simply -- the config comes pre-canned with the
system.  All you need to do is bootstrap pkg(8), like so:

   # pkg bootstrap

(Yes, you're using a command called 'pkg' to install another command
called 'pkg'.  Confusing, but if you read pkg(7) it explains the rational=

Now you can use pkg(8) to install software:

   # pkg install nginx

which does what you expect -- downloads packages for nginx and
everything nginx needs to be able to run and installs them.  Unlike
Debian, FreeBSD doesn't provide a pre-canned configuration or
automatically start up the nginx service: you're expected to write your
own nginx.conf and to update /etc/rc.conf to make nginx automatically
start on reboots.

You can upgrade anything that's out of date by:

   # pkg upgrade

and you can remove a package you no-longer want by:

   # pkg delete nginx

followed by:

   # pkg autoremove

which will delete anything that was installed solely to allow nginx to
work, and not also required by any other software you've installed since.=

There's a lot more to pkg(8) than that short introduction, but really
the install, upgrade and delete actions are enough to get you going.

The biggest gotcha you will find with pkg(8) is when you need some
software compiled with something other than the default set of port
options.  In which case, you'll probably want to start compiling that
port yourself.  But that's a question for another day.



Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

Comment: GPGTools -



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