LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Confused on how to remove a deb package with dpkg (https://www.linuxquestions.org/questions/debian-26/confused-on-how-to-remove-a-deb-package-with-dpkg-451242/)

dr_zayus69 06-03-2006 12:04 PM

Confused on how to remove a deb package with dpkg
 
hi. I want to uninstall mplayer that i compiled and installed with checkinstall. i used the list option to see if dpkg would list it.

Code:

echobase:/home/jeff# dpkg --list | grep mplayer
ii  mplayer-1.0pre 1.0pre7try2-1  mplayer

so it showed up. i've tried

Code:

dpkg --remove mplayer-1.0pre
as well as
Code:

dpkg --remove mplayer-1.0pre7try2-1
along with simply just mplayer and i get an error that says package is not installed. I'm used to rpm systems and i know with rpm when you remove a package you have to have to type the exact version when you pass it as an argument to rpm --remove. Is that the same with deb? Am im not sure why it says it isn't installed. thanks for any help in advance.

rickh 06-03-2006 12:15 PM

dpkg doesn't see it because dpkg did not install it. Checkinstall is a terrible thing. Might be OK for Slack or systems that require user intervention at every step along the way, but it does not understand the rules of an organized package management system. It also does not understand the File Heirarchy System, so it installs things wherever it happens to be. I don't know if there is a -remove flag for checkinstall or not. If not, you'll have to find all the pieces it installed and delete them manually.

Mplayer is available from reputable Debian repositories, and after you clean up the mess, if you still want it, install it using dpkg or apt-get.

craigevil 06-03-2006 07:23 PM

Checkinstall works just fine with apt/synaptic. Open synaptic and search for mplayer chances are it shows as installed and you can uninstalling from there , then add the Marillat repo and install it again.

dr_zayus69 06-04-2006 08:25 AM

thanks for your reply. I was able to uninstall it through synaptic. i didn't know checkinstall was such a bad thing. I read about it in LJ and it sounded useful so i started using it. When i installed mplayer i used the -D switch which tells checkinstall to create a deb package. I have had issues before with rpm systems before where querying would say it was installed but trying to uninstall it rpm would say that package was not installed. But you say it is good for slackware? That is good i suppose because im thinking of putting slackware on my laptop. thanks for the replies.

DeanLinkous 06-04-2006 09:52 AM

uh AFAIK dpkg just wants the packagename and not the version numbers and so forth.
dpkg -r mplayer
should of worked I guess or possibly apt or aptitude but it should be packagename I think.

David the H. 06-04-2006 02:02 PM

rickh is completely wrong. Checkinstall is great. It's worked just fine with dpkg everytime I've used it. As DeanLinkous said, you just need to know what argument to put in. If you watch the output as checkinstall installs the program, it will give you the string you need to uninstall it again.

Checkinstall doesn't need to know anything about the "file heirarchy system" or whatnot. All it really does is create a file tracker (in .deb package form, in this case) for wherever "make install" would normally place the files anyway, so that you can easily remove them again when you need to. That's its whole purpose after all, to make source-based installs and uninstalls easier. And dpkg handles packages made by it just fine because all it does is install and uninstall the files as they are listed in the package.

Oh, and it's also not true that dpkg doesn't install the packages made by it. If you watch the output carefully when you run checkinstall that's exactly what it does--it invokes dpkg to install the package it makes. In fact, if you happen to have synaptic or something that uses apt/dpkg open while you're using it, the final install will fail because dpkg is "in use", and you'll have to install the package manually instead.

Edit: Gotta mention one more thing. I just checked the man page, and it looks like you can use the "--pkgname=[name]" flag to create an easier-to-use package name if you have trouble remembering the ones checkinstall normally creates.


All times are GMT -5. The time now is 01:56 PM.