set desktop environment offline

Patrick Hess patrickhess at
Sat Jul 11 21:23:37 UTC 2015

arnab bhowmick wrote:
> Now is there any process which I can do to crate a backup of these
> desktop environment in CD or pen drive? Which I can use to install
> to re-install these environment in offline mode or more clearly
> without Internet??

If you simply want to be able to reinstall those packages without having
to download them all over again, have a look at your /var/cache/pkg
directory. That's where "pkg install" keeps copies of all the packages
it has downloaded. You can just copy this directory over to a pen drive,
an external disk, a file server etc., and then turn it into your very
own package repository as follows:

    # pkg repo /path/to/directory/with/all/your/packages

Next, create a file named "repo.conf" in the same directory:

    custom: {
            url: "file:/path/to/directory/with/all/your/packages",
            enabled: yes,

Then, on any machine you want to install packages from this "offline"
repository, create a /usr/local/etc/pkg.conf file that contains a
single line like this:

    REPOS_DIR [ /path/to/directory/with/all/your/packages ]

Now when running "pkg install", it will use your local packages
instead of downloading them from the online repository. You will
also be able to bootstrap pkg(8) this way without requiring an
active Internet connection. Furthermore, "pkg upgrade" will work
fine with this approach too, making for easy offline upgrades.


More information about the freebsd-questions mailing list