3

I got myself into trouble with mysql on debian lenny (details).

I tried these commands:

  • dpkg-reconfigure mysql
  • dpkg --purge mysql-server
  • apt-get install mysql-server
  • mysql_install_db

and variants of these in different order using killall mysql and killall mysqld and had no luck whatsoever. I even deleted every mysql folder listed in whereis mysql.

How do I properly reinstall a package? Because the above is not working for me.

1
  • What do you mean by “not working”? What did you expect to happen, and what actually happened? The commands you give reinstall the software (binaries and configuration files). They won't give you your database back. Commented Feb 12, 2011 at 21:54

2 Answers 2

6

The preferred way is via apt:

apt-get install --reinstall packageNameGoesHere
0

On Ubuntu one can go into synaptics and search for the software to remove. When right-clicking to see the contextual menu, one can see and select the option called "Mark for removal" (or "Mark for complete removal" if you want to purge the downloaded installer as well)

2
  • I have no gui, its a remote server. and its debian which is close to ubuntu but still no synaptics on it.
    – user4069
    Commented Feb 12, 2011 at 6:22
  • ok ,well i see you have aptitude (apt)..so you can use the option sudo apt-get --purge remove <package name> to completely remove something prior to re-installing it.. apt-get --purge reinstall <package> could be something to try first to see if this would fix the problem ...you can refer to this man page for all other options used by apt-get.. linux.die.net/man/8/apt-get Commented Feb 12, 2011 at 7:57

You must log in to answer this question.