4 ms·
In general it's not good to use that command because it can leave your system in an inconsistent state -- when there are packages which depend on the package yo
by andreasvc 14y ago
In general it's not good to use that command because it can leave your system in an inconsistent state -- when there are packages which depend on the package you just removed. apt-get works out the dependencies.
- dfc 14y agoWhat are you talking about? dpkg will not remove packages with dependencies unless you force it to: root@fw:~# dpkg -P libssl1.0.0 dpkg: dependency problems prevent removal of libssl1.0.0:amd64: python-openssl depends on libssl1.0.0 (>= 1.0.0). openssh-client depends on libssl1.0.0 (>= 1.0.1). ntp depends on libssl1.0.0 (>= 1.0.0). ...SNIP... bind9-host depends on libssl1.0.0 (>= 1.0.0). tor depends on libssl1.0.0 (>= 1.0.1). tcpdump depends on libssl1.0.0 (>= 1.0.0). libruby1.8 depends on libssl1.0.0 (>= 1.0.0). postfix depends on libssl1. dpkg: error processing libssl1.0.0:amd64 (--purge): dependency problems - not removing Errors were encountered while processing: libssl1.0.0:amd64 or root@fw:~# dpkg -P coreutils dpkg: error processing coreutils (--purge): This is an essential package - it should not be removed. Errors were encountered while processing: coreutils Take a look at --force-help for more info on forcing things.
- andreasvc 14y agoOkay but it doesn't change my point: better use apt-get.
- dfc 14y agoYou said: "In general it's not good to use that command because it can leave your system in an inconsistent state -- when there are packages which depend on the package you just removed." I demonstrated that dpkg will not remove packages with dependencies. Furthermore some packages are so crucial (ie: essential) that dpkg does not even bother checking dependencies before erroring out. How does that not change your point?
- andreasvc 14y agoThe reason I gave was incorrect (I was confused with what happens when you install a .deb file without installing its dependencies), but the point of apt-get being better than dpkg for this still stands.
- dfc 14y agoYour unsubstantiated claim still stands...
- andreasvc 14y agoI don't understand why you're making such a big fuss about this rather inconsequental point. All I'm saying is that you should generally use apt-get and not the lower level tool dpkg. I used an incorrect justification for that (removing doesn't lead to an inconsistent state), but you still should preferrably use apt-get. Let's get back to debating more interesting stuff now.
- dfc 14y agoI'm not the only one that thinks your claim is left wanting. I cannot speak for them but I am interested in why you think apt-get is preferred over dpkg in this case because I am a decade long loyal user of Debian. My original point was that the dpkg command is shorter and that is why I have used it over the longer apt-get invocation. I am generally interested in learning more about Debian. If the way I have been doing things is wrong I would like to know why so that I can improve my skills. Does that make sense? I'm not being snarky, I'm generally interested in learning more about Debian and it seems that you might be able to improve my knowledge.
- vacri 14y agoAs a Debian user, you should be using aptitude instead of apt-get anyway :)
- 14y ago