sudo port upgrade all

Emmanuel Hainry milosh at macports.org
Thu Nov 27 03:31:21 PST 2008


Citando David Epstein :
> 
> I mistakenly did sudo port upgrade all, instead of sudo port upgrade
> installed, and left my machine for 24 hours. It seems that a huge amount of
> stuff was installed, which I now want to get rid of.
> 
> Secondly I would welcome some helpful suggestions about how to recover from
> this situation. I want to identify the unnecessary installs, and uninstall
> them. I don't want to use -f, for fear of damaging my existing installation.
> 
> Unless there is a way of detecting dates of installation using some feature
> of "port",

/opt/local/var/macports/distfiles/ contains the distfiles of what you
installed. The dates of creation should inform you.

> the most hopeful route for me seems to be to use Unix "find".
> However, I don't understand the file structure of /opt/local well enough.
> How can I construct a find command that will get me only new installs, with
> only one hit per install? What I am talking about here is the fact that
> there are many files associated with each install, and I don't want a
> separate find hit for each of these files.

Unfortunately, new installs are not what you want to get rid of as you
reinstalled things that were already there! (however, the distfile date
should not have changed)

> Assuming that I can construct a list of unwanted ports, I can uninstall
> everything in the list, except that dependencies will prevent this. If I
> pass uninstall commands repeatedly over the list, what happens when it hits
> ports that have already been uninstalled? Or is there a better way. Again, I
> don't want to use force.

Why don't you want to use force? If you did not use force to install,
then removing a port will not damage another one. However, there exist
scripts that give you a tree of dependencies (search the archives of the
lis), you could use them to get rid of new ports with no dependencies
(recursively).

> Finally, does port uninstall (if successful) remove ALL the files associated
> with an install, or is some debris left that needs to be further cleaned?

You may want to "port clean --all" those ports to get rid of the
ditsfiles (source tarballs) and the packages (archives of what was
installed, you may not have this enabled).

Good luck,

Emmanuel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20081127/a1fe9e10/attachment.bin>


More information about the macports-users mailing list