Reputation: 2243
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.
Upvotes: 5
Views: 1890
Reputation: 7797
What you want to do is activate archive mode.
vi ${prefix}/etc/macports/macports.conf
Typically, your prefix is /opt/local
.
Inside that file, look for portarchivemode
and enable it. Now, whenever you install a package, the files will be archived as whatever portarchivetype
is 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.
Upvotes: 4
Reputation: 3057
I had the exact same question a few weeks ago. I searched through the Macports documentation without any luck. As far as I know, it doesn't have a command to do that.
Upvotes: 1