It looks like pkg remove <pkg> is able to remove a package installed via ports. But I didn't find any packages built by typing make in the ports dir. So what's the magic here? How does pkg remove know about the files belonging to a packge?
1 Answer
Using make install in the ports collection registers the package to the FreeBSD package system (by creating a temporary package manifest from the port and running pkg register). From this the pkg command knows what is installed and how to remove it.
a simple make install will install the application and register it with the package system.
It is also stated in the FreeBSD handbook that you can use pkg to remove installed ports.
Installed ports can be uninstalled using pkg delete.
- @JdeBP thanks for the edit. Including the creation of temporary manifest was a good clarification.StefanR– StefanR2016-12-29 09:07:26 +00:00Commented Dec 29, 2016 at 9:07
/var/db/pkgand contains all information needed for removing (etc.) packages. I'm sure this well explained in a FreeBSD manual for one of the package tools. Tryman pkg.