When you apply for a visa to the UK, the online form asks if you have ever had a passport in the past. When you say "yes," it asks what happened to it, and the identification number and issuing location, if possible. Problem is, if it expired and you chucked it, you don't have the information in all likelihood. And even though it says "if possible," it won't let you proceed until you enter the information.
Don't throw out your old passport, if you ever plan to apply for a visa.
Also, be warned that they ask for a huge amount of information (eg. In one field, they asked for my educational history since I was 11. My ages, my schools, the location, the years, graduation date, and what degree/diploma I earned.) and give you a teeny maximum character limit. You will be maddened.