Software maintenance is the modification of a software product after delivery to correct faults, to improve performance or other attributes, or to adapt the product to a modified environment.
The bug-fixing view- maintenance is the detection and correction of errors.
The need-to-adapt view - maintenance is making changes to software when it's operational environment or original requirement changes.
The user-support view - maintenance is the provision of support to users.
Why software maintenance is needed?