How to use system avr-gcc instead of Arduino one

sudo rm -rf /

So, you forced the removal of the root directory.

And everything below it.

How do I reverse this change?

Start reinstalling the operating system.