Literary texts such as novels, short story and poetry collections and anthologies are good to keep because even if newer editions come out, the basic material remains the same. If you had to use the books again at a later date you would have to buy or borrow them again, costing you time and money. Good books to keep include the classic literary works of British and American literature and those of other literary tradition that you are interested in.
You may never get to use them later, but then again, you might. Books related to your major, such as reference guides, textbooks on various topics and even anthologies can serve as references for later or can help you answer a difficult question more easily in the future. If you're the type who takes notes in your textbooks it's even more important not to sell them.
If you took an interesting course that was not related to your major but which you found very stimulating, by all means keep the books. Those books carry sentimental value and are worth keeping simply because the amount you get for selling them may not be worth the exchange. Besides, you may find that you want to reignite your interest in the topic later in life and could begin by consulting your old textbooks.
Reference books are books such as encyclopedias, dictionaries and scientific or style manuals that you could use for more than one class or that you may have to use when you pursue advanced studies. A good example of this kind of book is a style guide such as Research and Documentation in an Electronic Age by Diana Hacker and Barbara Fister.