Carry trades - Buying and Selling

When we borrow in the lower yielding currency (funding currency) are we essentially buying or selling the funding currency? Because one of the questions mentioned that to unwind a carry trade position we need to buy (not sell) the funding currency. Is that correct?

You _ borrow JPY _, convert them to BRL (i.e., sell JYP, buy BRL), and invest (lend) BRL at the local risk-free rate. If you want to unwind the trade, you have to retreive your lent BRL, convert them to JPY (i.e., sell BRL, _ buy JPY _), and repay the JPY loan.

That clears it. Thank you.

You’re welcome.