If you have purchased an upgrade version of Windows XP, it would not be legal
and in some cases may be very foolish to sell the previous version.
Most software upgrades require either a previous version be installed/present or
require proof/validation that one has ownership of the setup media for it.
As an example, a few years ago I purchased and installed the upgrade version of
Windows for Workgroups 3.11. It required that Windows 3.1 to be installed on the
system before it would install itself. This wasn't just a case where it asked
for verification of a previous version. So, in cases like this, it would be
foolish to sell the previous version, for obvious reasons.
Most EULAs that address upgrades will state that both (or all) versions must be
maintained as a "single product". Here's an excerpt from one of Microsoft's
EULAs:
---quote---
3. UPGRADES. If the SOFTWARE PRODUCT is an upgrade from another product, whether
from Microsoft or another supplier, you may use or transfer the SOFTWARE PRODUCT
only in conjunction with that upgraded product, unless you destroy the upgraded
product. If the SOFTWARE PRODUCT is an upgrade of a Microsoft product, you now
may use that upgraded product only in accordance with this EULA. If the SOFTWARE
PRODUCT is an upgrade of a component of a package of software programs that you
licensed as a single product, the SOFTWARE PRODUCT may be used and transferred
only as part of that single product package and may not be separated for use on
more than one computer.
---end quote---
If the system is to be upgraded using non-upgrade (i.e., Retail or OEM) version,
then the whole issue is moot, and you 're free to sell or transfer the previous
version as long as it complies with the transfer requirements of its EULA.
Here's another excerpt from the same EULA regarding transfers:
---quote---
Software Transfer. You may permanently transfer all of your rights under this
EULA, provided you retain no copies, you transfer all of the SOFTWARE PRODUCT
(including all component parts, the media and printed materials, any upgrades,
this EULA and, if applicable, the Certificate of Authenticity), and the
recipient agrees to the terms of this EULA. If the SOFTWARE PRODUCT is an
upgrade, any transfer must include all prior versions of the SOFTWARE PRODUCT.
---end quote---