Dear readers,

It may not be very obvious that 'dry run' mode of pkg_add
actually downloads packages.
It is a good feature and maybe the pkg_add man could use an EXAMPLES
section.

Index: pkg_add.1
===================================================================
RCS file: /cvs/src/usr.sbin/pkg_add/pkg_add.1,v
retrieving revision 1.163
diff -u -p -r1.163 pkg_add.1
--- pkg_add.1   24 Jan 2020 21:10:46 -0000      1.163
+++ pkg_add.1   23 Jun 2020 23:25:12 -0000
@@ -836,6 +836,18 @@ information about individual packages
 database of installed
 .Xr packages 7
 .El
+.Sh EXAMPLES
+It is possible to download packages before installing them to separate
download and installation process.
+.Pp
+.Dl PKG_CACHE=/tmp/pkgs pkg_add -I -u -n
+.Pp
+will download the package(s) to be updated into .Dq /tmp/pkgs
+directory
+and they can be installed later
+.Pp
+pkg_add -I /tmp/pkgs/*
+.Pp
+.El
 .Sh SEE ALSO
 .Xr ftp 1 ,
 .Xr pkg_create 1 ,

Best,

Reply via email to