But the seller must guanrantee that all versions has been uninstalled and that the version going to the buyer is original and clean; the license must not be in use. It also depends on the license, if its to per user or per machine. Some also involve informing the company of the change in user. Private sale of software are actually ok unless the output of the software is put to commercial uses.
It would be better or easier to say that it's not legal since its difficult to fulfill such conditions.
Hi itsybitsyspidy, this should be spelled out in the software's license agreement that is usually displayed when you run the software's installation program, right before the software actually begins to install itself.