I wanted to hold and trade 5 assets. It will cost me 2.5 XLM in the min-reserve to create these trustlines alone. If I am done with 2 assets and now want to only hold 3, I can delete 2 trustlines. Does my account get credited with 1 XLM?
Trustlines, Offers, Signers, and Data Values are called subentries. Each subentry locks 0.5 XLM from your account for the min_reserve.
When you remove a subentry from your account, the corresponding XLM balance is unlocked and you can use it. This is described in more detail here, quoting:
Minimum Account Balance
All Stellar accounts must maintain a minimum balance of lumens. Any transaction that would reduce an account’s balance to less than the minimum will be rejected with an
The minimum balance is calculated using the base reserve, which is 0.5 XLM:
(2 + # of entries) × base reserve
The minimum balance for a basic account is
2 × base reserve. Each additional entry costs the base reserve.