You can sell your CENVAT-availed machinary as second hand capital goods, if you does not need them. The machinery may be in working condition or could be brought in working condition after some expenditure.
In such case, if capital goods are removed after use, the manufacturer or output service provider shall pay an 'amount' (not 'excise duty') equal to CENVAT credit taken on the said capital goods, reduced by 2.5% for each quarter of a year or part-thereof from the date of taking the CENVAT credit, except in case of computers [second proviso to rule 3(5) of CENVAT Credit Rules, inserted w.e.f. 13-11-2007].
In your specific case, i.e. after 15-20 years of use the machine may be treated as scrap andas per rule 3(5A) of CENVAT Credit Rules, if capital goods are removed as scrap, the manufacturer shall pay an 'amount' equal to duty payable on transaction value. In other words, an 'amount' equal to duty on scrap value should be paid. It should be shown as 'amount' in the invoice and not 'duty'. Rule 3(6) makes it clear that the buyer can not avail CENVAT credit of the 'amount'.
The provision of payment of 'amount' applies even if capital goods are removed as scrap after ten years - CBE&C instruction No. 267/141 /2009-CX dated 7-12-2009