Solved Offline installation of packages

Hi everyone, I am a FreeBSD beginner and I have a system that is offline, this means I can't use any online package repo to install packages on said machine. This machine uses the i386 architecture and is on FreeBSD 12.0.

Is there a way to download a repository of all the latest binary packages in FreeBSD, and then put them onto this machine so I can install packages using a "local" database?

If there is a way, what is the URL of this repository?
 
is on FreeBSD 12.0
FreeBSD 12.0 is End of Life and unsupported.

The supported versions here in forums are 12.3-RELEASE, 12.4-RC1 or -RC2 (release candidate), 13.1-RELEASE, 13.1-STABLE.

To get support here in forums, please choose one, I suggest 12.3- or 13.1-RELEASE.

Is there a way to download a repository of all the latest binary packages in FreeBSD, and then put them onto this machine so I can install packages using a "local" database?
You can download a complete FreeBSD i386 branch package repository easiest from another FreeBSD installation, a online PC, same branch and version. It can be on a USB stick or other external device.

See pkg-fetch(8)
Code:
OPTIONS

     -a, --all     Fetch all packages.
     -o destdir, --output destdir
                   Place files in a sub-directory called All of the specified
                   directory.  In this mode, packages are fetched for
                   distribution instead of placing them into the internal
                   cache.
Example: pkg fetch -o /packages -a. Create a /packages directory before executing the command.

But be aware, the offical remote package repository is ~ 100 GB, make sure the device has sufficient space on disk.

For the 'latest" binary packages change in /etc/pkg/FreeBSD.conf on the external device from quarterly to latest.

It's also possible to download only the desired programs. Example:

pkg fetch -d -o /packages pkg bash xorg xfce4-wm ('pkg' mandatory)

Code:
     -d, --dependencies
                   Fetch the package and its dependencies as well.

To install the downloaded packages, boot up the offline PC, mount the external device and execute following commands:
Code:
# cd /mnt/packages/All

# setenv SIGNATURE_TYPE NONE ; pkg add pkg-1.18.4.pkg
Use csh(1) (root's default shell) word complete function for packages names (tab key). Continue pkg-add(8) the other packages.
 
FreeBSD 12.0 is End of Life and unsupported.

The supported versions here in forums are 12.3-RELEASE, 12.4-RC1 or -RC2 (release candidate), 13.1-RELEASE, 13.1-STABLE.

To get support here in forums, please choose one, I suggest 12.3- or 13.1-RELEASE.


You can download a complete FreeBSD i386 branch package repository easiest from another FreeBSD installation, a online PC, same branch and version. It can be on a USB stick or other external device.

See pkg-fetch(8)
Code:
OPTIONS

     -a, --all     Fetch all packages.
     -o destdir, --output destdir
                   Place files in a sub-directory called All of the specified
                   directory.  In this mode, packages are fetched for
                   distribution instead of placing them into the internal
                   cache.
Example: pkg fetch -o /packages -a. Create a /packages directory before executing the command.

But be aware, the offical remote package repository is ~ 100 GB, make sure the device has sufficient space on disk.

For the 'latest" binary packages change in /etc/pkg/FreeBSD.conf on the external device from quarterly to latest.

It's also possible to download only the desired programs. Example:

pkg fetch -d -o /packages pkg bash xorg xfce4-wm ('pkg' mandatory)

Code:
     -d, --dependencies
                   Fetch the package and its dependencies as well.

To install the downloaded packages, boot up the offline PC, mount the external device and execute following commands:
Code:
# cd /mnt/packages/All

# setenv SIGNATURE_TYPE NONE ; pkg add pkg-1.18.4.pkg
Use csh(1) (root's default shell) word complete function for packages names (tab key). Continue pkg-add(8) the other packages.
Thanks for this reply! I'll mark this as solved now since this is exactly what I wanted.
 
Back
Top