Debian – Remove a package completely


remove-from-database-iconApt-get remove is not always enough to remove a package completely. If you try to remove in example the mysql-server package with just apt-get remove, the settings and lot of dependencies will still be left. We will need to purge and clean up. Here is a short desription on how to perform a complete removal of mysql-server with settings and everything.

First you need to run the remove –purge command.
[sourcecode language=”css”]
apt-get remove –purge mysql\*
[/sourcecode]
Next step is probably not recommended by debian.org as it will increase their bandwith (unless you run your own apt-get cache server, which I recommend everyone to do). That is to clean the package cache.
apt-get clean

The last step is often forgotten, included by my self. That is to update the file database. Else references to all the deleted files will still be present.
updatedb

Thats it, and your mysql server is now completely gone.

Happy deleting!

Have any Question or Comment?

Leave a Reply