I recently purchased a MacBook Pro 13" with the M1 chip and transferred all my data over using a Time Machine backup. Homebrew packages are currently installed in `/usr/local/opt/` but it is my understanding that they should be under `/opt/homebrew` for Apple Silicon Macs.

How can I:
1. Get the list of packages I currently have installed
2. Remove those from `/user/local/opt`
3. Reinstall them under `/opt/homebrew`

I kind of assumed Homebrew would be clever enough to do this automatically but apparently it needs some manual maintenance.
Thanks in advance!