homebrew – Brew – undo whatever the heck it just did for installation

Disclaimer – I am not a Mac person….

I wanted a very simple text editor that I could save a small python script with. Text edit wouldn’t let me save a .py, so I was like hmm – I’ll just install gedit which I see on machines all the time. Must be small.

brew install gedit

10 mins later stuff was still installing, wasting tons of my precious 256Gb disk space. I cancelled it, but now I have no idea how to uninstall whatever the hell brew just dumped into my machine and its really bothering me.

Can anyone help me to get rid of that? brew uninstall gedit doesn’t do anything.