Date: Wed, 6 Oct 2021 08:43:26 +0700 From: Eugene Grosbein <eugen@grosbein.net> To: Per olof Ljungmark <peo@nethead.se>, ports@freebsd.org Subject: Re: Remove a port without removing files Message-ID: <bc725656-e7d3-e00d-226d-a2b1f538b3f1@grosbein.net> In-Reply-To: <199845d7-2be0-f572-b6f5-78a2d51562bb@nethead.se> References: <199845d7-2be0-f572-b6f5-78a2d51562bb@nethead.se>
next in thread | previous in thread | raw e-mail | index | archive | help
06.10.2021 0:03, Per olof Ljungmark wrote: > As the subject says, I need to remove a port so pkg etc does not care about it, but keeping all the ports files intact. A package is just a tar.xz archieve and you may create it from installed port with "pkg create" command like this: pkg create zfs-stats-1.3.0 It is not possible to remove a port without removing files but you may create a package beforehand as shown above, then pkg delete it, then use: tar --exclude '+*' -C / -xkvf zfs-stats-1.3.0.pkg This tar command extracts removed files back without registering the package. Note that "pkg delete" will not remove files of the port that were modified after installation (config files etc.) and tar command will not overwrite them, too due to -k flag.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bc725656-e7d3-e00d-226d-a2b1f538b3f1>