optimized sync media - removing local media in transaction