diff --git a/pages/PortsToPkg.md b/pages/PortsToPkg.md new file mode 100644 index 0000000..d1eb05b --- /dev/null +++ b/pages/PortsToPkg.md @@ -0,0 +1,34 @@ +# FreeBSD - Migrating from Source Ports to Binary Pkg + +``` +pkg info -aqo > packages +``` + +You may want to edit `packages`. + +Before you whack things, it would be prudent to have a spare `pkg-static` on hand. + +``` +rsync -vlpPtgoHx /usr/local/sbin/pkg-static /root +``` + +Now do the dirty. + +``` +pkg delete -a +pkg install `cat packages` +``` + +And fix `/etc/crontab` to have + +``` +pkg version -vRl"<" +``` + +If you get errors such as `size mismatch, fetching from remote`, then try + +``` +pkg clean +rm -rf /var/cache/pkg/* +pkg update -f +``` \ No newline at end of file