How to delete macOS diagnostic logs

This command clears the main log, temporary log, TTL log, and error log; the system then automatically rebuilds the necessary files.\n\nsudo log erase --all\n