pkg-static.pkgsave, where does it come from?

I removed pkg with pkg delete -f pkg, and then I used pkg install -f pkg, the system return:
root@freebsd:~ # pkg install -f pkg
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+https://pkg.freebsd.org/FreeBSD:14:amd64/latest, please wait...
It's very slow, and sometimes it fails.
If I use pkg-static.pkgsave install -f pkg, it will install pkg very quickly.
zjs@freebsd:~ % which pkg-static.pkgsave
/usr/local/sbin/pkg-static.pkgsave
zjs@freebsd:~ % pkg which /usr/local/sbin/pkg-static.pkgsave
/usr/local/sbin/pkg-static.pkgsave was not found in the database
zjs@freebsd:~ % ls -al /usr/local/sbin/pkg-static.pkgsave
-rwxr-xr-x 1 root wheel 27768016 Nov 19 2022 /usr/local/sbin/pkg-static.pkgsave
so where does it come from?
 
When a package tries to install, and there's already an executable in place, the original executable is saved with the *.pkgsave extension.

I removed pkg with pkg delete -f pkg, and then I used pkg install -f pkg, the system return:
Why would you want to remove pkg(8)? In any case; pkg bootstrap -f would be the correct command. This executes pkg(7) and forces the initial bootstrap to install pkg(8).
 
Back
Top