# How to change pkg repository?



## neoblackcap (May 1, 2014)

I have read the manual of pkg and pkg.conf. However I can't find how to change pkg repository. PACKAGESITE and MIRROR_TYPE are deprecated. What is the right way to change repository? And is the pkg repository different with the full freebsd FreeBSD mirrors?


----------



## Beastie (May 1, 2014)

The bare minimum...

/etc/pkg/FreeBSD.conf:

```
FreeBSD: { 
  url             : "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  enabled         : yes,
  mirror_type     : "SRV",
}
```

Change the url part to whatever suits you. The above uses the defaults: it tells pkg to fetch packages for the system's arch_itecture_ and lets the server redirect to the closest mirror.

I don't understand your second question. What repository are you talking about and what are "full FreeBSD mirrors"?!


----------



## neoblackcap (May 1, 2014)

As I know, the pkg repository only contains binary packages. But the full FreeBSD mirrors contain source code and binary packages (maybe that is called Ports repository, I don't know). That's worked on Ports and I know that contains binary packages. So I wonder whether it can be used as a pkg repository.


----------

