Excell Contribution to Roth IRA.

In 2021 my only income was from a  federal grant and from investments. My income was reported on 1099-G and the usual 1099-Int and 1099-Div.  I had no wages, no salary.  Being uniformed, I made an after-tax contribution to my traditional IRA, then did "back door" conversion to my Roth IRA.  Now I learn that with no 1040 line 1 earnings, this IRA contribution is not allowed.  How do I remove the excess contribution made to the IRA and converted to the Roth IRA? Thank you.