cleaning up

Bradley Giesbrecht brad at
Mon Jan 11 15:40:25 PST 2010

On Jan 11, 2010, at 2:28 PM, Jeremy Lavergne wrote:

>> When an install/upgrade of forced with -f port renames the existing  
>> file appending and extension .mp_<numbers>, correct?
> Yup.
>> Is <number> a timestamp or something else?
> Yup.
>> Is there a port command for cleaning/deleting these files?
> Nope, try:
> find $prefix -name *.mp<number> -exec rm -rf {} \;

Thanks, this works.

Does this look safe?

find -E $prefix  -regex .*.mp_[0-9]* -exec rm -f {} \;

I'd rather not remove directories so I replace rm -rf with rm -f.

The thing I don't like about this approach is what if I have a  
database named mp_somedb or mp_somedb.mp_sometable in /opt/local/var/ 

To be safer yet is the timestamp always x digits long? I'd rather use  

I don't really think there is any safe way to do this. I'd like to see  
port keep track of these renames in a registry.

I would really need to move all my data (apache, dovecot, postfix,  
mysql ) outside /opt/local to feel safe with a "find . *.mp* rm"  

// Brad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the macports-dev mailing list