# Relation between pkgng and /usr/ports



## alie (Nov 28, 2012)

As per subject. Do I still need /usr/ports if I use ports-mgmt/pkg?

Regards,
Alie T


----------



## kpa (Nov 28, 2012)

Most of the time you don't need /usr/ports if you install everything from packages. Checking for out of date packages uses /usr/ports by default but that can be changed with the following options for pkg version and depending if you have a ports tree at /usr/ports


```
-I  Use INDEX file for determining if a package is out of date.

     -P  Use ports for determining if a package is out of date.  This is the
         default if a ports tree exists.  The tree used can be overridden by
         PORTSDIR, see pkg(5) for more information.

     -R  Use repository catalogue for determining if a package is out of date.
         This is the default if no ports tree exists.
```

So if you don't have /usr/ports the comparison will be made against the remote repository.


----------



## Beeblebrox (Nov 28, 2012)

You might want to read through this:
http://forums.freebsd.org/showpost.php?p=198266&postcount=3


----------

