Suppose I want to reset a port to its initial state, including its configuration files. This can be achieved by:
sudo port uninstall portname sudo port install portname
(Deactivating and then reactivating the port does not reset the configuration files.)
Is there any way to do this without uninstalling and reinstalling the port, avoiding the overhead of having to rebuild the package?
Edit: Thanks for the replies, Alexander and Nerdling. Archive mode worked for me.
What you want to do is activate archive mode.
Typically, your prefix is
/opt/local.Inside that file, look for
portarchivemodeand enable it. Now, whenever you install a package, the files will be archived as whateverportarchivetypeis set to.Supported types: tgz (default), tar, tbz, tbz2, tlz, xar, zip, cpgz, cpio
If you uninstall a port, it will open the archive rather than rebuilding everything.