They're deleted from the top. It basically scrolls down, so if you put a L20 Sandshrew in there and let it stay until L30, it'd be...
Level 20
Scratch KNOWN
Defense Curl KNOWN
Sand Attack KNOWN
Poison Sting KNOWN
Slash LEVEL 23
Swift LEVEL 30
Level 30
Scratch FORGOTTEN
Defense Curl FORGOTTEN
Sand Attack KNOWN
Poison Sting KNOWN
Slash KNOWN
Swift KNOWN
It depends on the current order of your move list, though. So be sure to order your attacks from least wanted at the top to critically important at the bottom.