pear cleanup and rebuild