Outlook holding onto old mailboxes that you had full permissions to

Sometimes you give yourself full permissions to a mailbox for testing. After you remove your access, the mailbox hangs around your Outlook. Attempts to remove the mailbox give you the error

This group of folders is associated with an e-mail account. To remove the account, click the File Tab, and on the Info tab, click Account Settings. Select the e-mail account, and then click Remove.

The fix for this is to add yourself back to the mailbox with Powershell while using the -Automapping flag, then remove your access again.

Add-MailboxPermission -Identity TARGETACCOUNT -User YOURACCOUNT -AccessRights FullAccess -InheritanceType All -Automapping $false
Remove-MailboxPermission -Identity TARGETACCOUNT -User YOURACCOUNT -InheritanceType All -AccessRights FullAccess