3 ms·
What 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 proble
by dfc 14y ago
What 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 :)
- dfc 14y agoI know. Most of it is just a matter of aptitude not being around 12 years ago. I really like the search and install related packages functionality of aptitude.
- andreasvc 14y agoOkay fine "wrong" is perhaps too strong, it's rather "not appropriate/ideal". My point was simply that dpkg is lower level, so it should not be the go-to tool for normal users. The comment which started all this was the comment suggesting a command with "dpkg" was 'better' (because it was a few characters shorter I suppose), and I merely chimed in to point out that that was probably not a good thing to say, thinking of how this lower level tool provides more potential for mucking up your system; e.g., accidentally trying to remove an essential package; I believe dpkg wouldn't ask for confirmation right? Also new users would probably be overwhelmed by all the options of dpkg. The only time I've been forced to use dpkg in the past ten years was when the system was seriously messed up e.g. in the middle of a failed upgrade.