The answer to 'how to replace generator installation' is to hire a licensed and experienced electrical contractor. Replacing a generator requires disconnecting the old unit, installing a new one, and properly connecting the electrical wiring and fuel supply. This is a complex and potentially dangerous task that should not be attempted by homeowners without the proper expertise and equipment.
A professional electrician will ensure the new generator is installed safely, up to code, and functioning properly. They will also be able to properly dispose of the old generator and obtain any necessary permits or inspections.