It depends on your carrier and phone. With most carriers, you will keep your voicemails as long as you have the same phone number. If you switch to a new phone, you may need to port your number to the new phone in order to keep your voicemails.