If the deposit is kept without making any conditions upon the bank that they have to give you the interest, then:
If the bank was from the private sector then the whole interest is permissible,
If the bank was entirely government or semi-government, then one can take half of the interest and the other half gives it to the poor as a charity on behalf of the unknown owner.