Use echo y | apt remove ${} XXX, use this approach can automatically interaction
Delete all the native mysql related software, for example, use the following command:
For I in ` DPKG -l | grep mysql | awk '{print $2}' `; Do the echo y | apt remove ${I}; The done
For yum is a system, it also can be so operation, only need to put the DPKG - l replacement for RPM - qa, change apt remove to RPM -e -- nodeps, XXX can