Ubuntu – How to remove installed packages

mysql-workbenchsoftware installation

I installed a 32 bit MySQL workbench packages. But I faced many problems and tried to find answers here … then I've known that my Ubuntu is 64 bit … and downloaded the version of MySQL for 64 bit.

When I've typed:

sudo dpkg -i mysql_64_bit.deb 

The system asked me to remove the oldest one so I typed:

teeba@ubuntu:~/Downloads$ sudo dpkg -r mysql-workbench-community-6.0.9-1ubu1204-i386.deb

I've gotten the following:

dpkg: error: you must specify packages by their own names, not by quoting the names of the files they come in

Type dpkg --help for help about installing and deinstalling packages [*];
Use `dselect' or `aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;

Options marked [*] produce a lot of output - pipe it through `less' or `more' !

Can anyone give me the right way to install the right one and remove the oldest one?

Best Answer

dpkg --get-selections | grep mysql

The above command will displays all the packages that have the word mysql.From that you can find the exact one and then remove it by running,

sudo dpkg -P <packageName>

The below command does not remove the installed mysql package,

teeba@ubuntu:~/Downloads$ sudo dpkg -r mysql-workbench-community-6.0.9-1ubu1204-i386.deb
Related Question