Like apt-get, aptitude is an extremely powerful package management tool in Debian and its derivative systems. Unlike apt-get, aptitude is better at dealing with dependency issues. For example, when aptitude deletes a package, it also deletes the packages it depends on. In this way, no useless packages are left in the system, and the entire system is cleaner. The following are some commonly used aptitude commands summarized by the author for reference only.
command | effect |
aptitude update | Update the list of available packages |
aptitude upgrade | Upgrade available packages |
aptitude dist-upgrade | Upgrade the system to a new release |
aptitude install pkgname | Installation package |
aptitude remove pkgname | Delete package |
aptitude purge pkgname | Delete the package and its configuration file |
aptitude search string | Search package |
aptitude show pkgname | Show package details |
aptitude clean | Delete the downloaded package file |
aptitude autoclean | Only delete expired package files |
After uninstalling mysql-server-5.0, the reinstallation is unsuccessful, and it prompts invoke-rc.d: initscript mysql, action "start" failed.
Solution
invoke-rc.d: initscript mysql, action "start" failed.
carried out
$ sudo aptitude purge mysql-server mysql-common
$ sudo rm -R /etc/mysql/*
Reinstall
Of course, you can also use aptitude in text interface mode.