Why does apt-get autoremove uninstall less packages than aptitude remove does?
I am using Ubuntu 18.04. I have a condition where I install using command apt-get install package_name
which installs the package along with all of its dependencies.
When I try to uninstall the same package using command apt-get autoremove --purge package_name
it uninstalls most of the dependencies but not all. On the other hand, when I try to uninstall a package using aptitude it is working fine, – e.g. uninstalling using apt-get autoremove
uninstalls 55 dependencies (not removing all dependencies), but uninstalling using aptitude uninstalls 61 dependencies (which is correct).
Do you have any idea if I am going wrong with apt-get autoremove
command or any help understanding why apt-get autoremove
uninstalls less packages than aptitude does?
Output of sudo apt-get autoremove --purge package_name
and sudo aptitude purge package_name
:
$ sudo apt-get autoremove --purge package_name
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
package_name* dependency1* dependency2* dependency3* dependency4* dependency5*
dependency6* dependency7* dependency8* dependency9* dependency10*
dependency11* dependency12* dependency13* dependency14* dependency15*
dependency16* dependency17* dependency18* dependency19* dependency20*
dependency21* dependency22* dependency23* dependency24* dependency25*
dependency26* dependency27* dependency28* dependency29* dependency30*
dependency31* dependency32* dependency33* dependency34* dependency35*
dependency36* dependency37* dependency38* dependency39* dependency40*
dependency41* dependency42* dependency43* dependency44* dependency45*
dependency46* dependency47* dependency48* dependency49* dependency50*
dependency51* dependency52* dependency53* dependency54* dependency55*
0 upgraded, 0 newly installed, 55 to remove and 222 not upgraded.
After this operation, 727 MB disk space will be freed.
$ sudo aptitude purge package_name
The following packages will be REMOVED:
package_name{p} dependency1{u} dependency2{u} dependency4{u} dependency5{u}
dependency6{u} dependency8{u} dependency9{u} dependency10{u}
dependency11{u} dependency12{u} dependency13{u} dependency14{u} dependency15{u}
dependency16{u} dependency17{u} dependency18{u} dependency19{u}
dependency21{u} dependency22{u} dependency23{u} dependency24{u} dependency25{u}
dependency26{u} dependency27{u} dependency28{u} dependency30{u}
dependency31{u} dependency32{u} dependency33{u} dependency34{u} dependency35{u}
dependency36{u} dependency38{u} dependency39{u} dependency40{u}
dependency41{u} dependency42{u} dependency43{u} dependency44{u} dependency45{u}
dependency46{u} dependency47{u} dependency48{u} dependency49{u} dependency50{u}
dependency51{u} dependency52{u} dependency53{u} dependency54{u} dependency55{u}
dependency56{u} dependency57{u} dependency58{u} dependency59{u} dependency60{u} dependency61{u}
0 packages upgraded, 0 newly installed, 61 to remove and 222 not upgraded.
Need to get 0 B of archives. After unpacking 1,133 MB will be freed.
apt package-management dependencies uninstall aptitude
add a comment |
I am using Ubuntu 18.04. I have a condition where I install using command apt-get install package_name
which installs the package along with all of its dependencies.
When I try to uninstall the same package using command apt-get autoremove --purge package_name
it uninstalls most of the dependencies but not all. On the other hand, when I try to uninstall a package using aptitude it is working fine, – e.g. uninstalling using apt-get autoremove
uninstalls 55 dependencies (not removing all dependencies), but uninstalling using aptitude uninstalls 61 dependencies (which is correct).
Do you have any idea if I am going wrong with apt-get autoremove
command or any help understanding why apt-get autoremove
uninstalls less packages than aptitude does?
Output of sudo apt-get autoremove --purge package_name
and sudo aptitude purge package_name
:
$ sudo apt-get autoremove --purge package_name
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
package_name* dependency1* dependency2* dependency3* dependency4* dependency5*
dependency6* dependency7* dependency8* dependency9* dependency10*
dependency11* dependency12* dependency13* dependency14* dependency15*
dependency16* dependency17* dependency18* dependency19* dependency20*
dependency21* dependency22* dependency23* dependency24* dependency25*
dependency26* dependency27* dependency28* dependency29* dependency30*
dependency31* dependency32* dependency33* dependency34* dependency35*
dependency36* dependency37* dependency38* dependency39* dependency40*
dependency41* dependency42* dependency43* dependency44* dependency45*
dependency46* dependency47* dependency48* dependency49* dependency50*
dependency51* dependency52* dependency53* dependency54* dependency55*
0 upgraded, 0 newly installed, 55 to remove and 222 not upgraded.
After this operation, 727 MB disk space will be freed.
$ sudo aptitude purge package_name
The following packages will be REMOVED:
package_name{p} dependency1{u} dependency2{u} dependency4{u} dependency5{u}
dependency6{u} dependency8{u} dependency9{u} dependency10{u}
dependency11{u} dependency12{u} dependency13{u} dependency14{u} dependency15{u}
dependency16{u} dependency17{u} dependency18{u} dependency19{u}
dependency21{u} dependency22{u} dependency23{u} dependency24{u} dependency25{u}
dependency26{u} dependency27{u} dependency28{u} dependency30{u}
dependency31{u} dependency32{u} dependency33{u} dependency34{u} dependency35{u}
dependency36{u} dependency38{u} dependency39{u} dependency40{u}
dependency41{u} dependency42{u} dependency43{u} dependency44{u} dependency45{u}
dependency46{u} dependency47{u} dependency48{u} dependency49{u} dependency50{u}
dependency51{u} dependency52{u} dependency53{u} dependency54{u} dependency55{u}
dependency56{u} dependency57{u} dependency58{u} dependency59{u} dependency60{u} dependency61{u}
0 packages upgraded, 0 newly installed, 61 to remove and 222 not upgraded.
Need to get 0 B of archives. After unpacking 1,133 MB will be freed.
apt package-management dependencies uninstall aptitude
@user535733 Sorry, but will not be able to give exact names of dependencies due to some policy.
– Pulkit Lall
Dec 17 '18 at 6:53
add a comment |
I am using Ubuntu 18.04. I have a condition where I install using command apt-get install package_name
which installs the package along with all of its dependencies.
When I try to uninstall the same package using command apt-get autoremove --purge package_name
it uninstalls most of the dependencies but not all. On the other hand, when I try to uninstall a package using aptitude it is working fine, – e.g. uninstalling using apt-get autoremove
uninstalls 55 dependencies (not removing all dependencies), but uninstalling using aptitude uninstalls 61 dependencies (which is correct).
Do you have any idea if I am going wrong with apt-get autoremove
command or any help understanding why apt-get autoremove
uninstalls less packages than aptitude does?
Output of sudo apt-get autoremove --purge package_name
and sudo aptitude purge package_name
:
$ sudo apt-get autoremove --purge package_name
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
package_name* dependency1* dependency2* dependency3* dependency4* dependency5*
dependency6* dependency7* dependency8* dependency9* dependency10*
dependency11* dependency12* dependency13* dependency14* dependency15*
dependency16* dependency17* dependency18* dependency19* dependency20*
dependency21* dependency22* dependency23* dependency24* dependency25*
dependency26* dependency27* dependency28* dependency29* dependency30*
dependency31* dependency32* dependency33* dependency34* dependency35*
dependency36* dependency37* dependency38* dependency39* dependency40*
dependency41* dependency42* dependency43* dependency44* dependency45*
dependency46* dependency47* dependency48* dependency49* dependency50*
dependency51* dependency52* dependency53* dependency54* dependency55*
0 upgraded, 0 newly installed, 55 to remove and 222 not upgraded.
After this operation, 727 MB disk space will be freed.
$ sudo aptitude purge package_name
The following packages will be REMOVED:
package_name{p} dependency1{u} dependency2{u} dependency4{u} dependency5{u}
dependency6{u} dependency8{u} dependency9{u} dependency10{u}
dependency11{u} dependency12{u} dependency13{u} dependency14{u} dependency15{u}
dependency16{u} dependency17{u} dependency18{u} dependency19{u}
dependency21{u} dependency22{u} dependency23{u} dependency24{u} dependency25{u}
dependency26{u} dependency27{u} dependency28{u} dependency30{u}
dependency31{u} dependency32{u} dependency33{u} dependency34{u} dependency35{u}
dependency36{u} dependency38{u} dependency39{u} dependency40{u}
dependency41{u} dependency42{u} dependency43{u} dependency44{u} dependency45{u}
dependency46{u} dependency47{u} dependency48{u} dependency49{u} dependency50{u}
dependency51{u} dependency52{u} dependency53{u} dependency54{u} dependency55{u}
dependency56{u} dependency57{u} dependency58{u} dependency59{u} dependency60{u} dependency61{u}
0 packages upgraded, 0 newly installed, 61 to remove and 222 not upgraded.
Need to get 0 B of archives. After unpacking 1,133 MB will be freed.
apt package-management dependencies uninstall aptitude
I am using Ubuntu 18.04. I have a condition where I install using command apt-get install package_name
which installs the package along with all of its dependencies.
When I try to uninstall the same package using command apt-get autoremove --purge package_name
it uninstalls most of the dependencies but not all. On the other hand, when I try to uninstall a package using aptitude it is working fine, – e.g. uninstalling using apt-get autoremove
uninstalls 55 dependencies (not removing all dependencies), but uninstalling using aptitude uninstalls 61 dependencies (which is correct).
Do you have any idea if I am going wrong with apt-get autoremove
command or any help understanding why apt-get autoremove
uninstalls less packages than aptitude does?
Output of sudo apt-get autoremove --purge package_name
and sudo aptitude purge package_name
:
$ sudo apt-get autoremove --purge package_name
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
package_name* dependency1* dependency2* dependency3* dependency4* dependency5*
dependency6* dependency7* dependency8* dependency9* dependency10*
dependency11* dependency12* dependency13* dependency14* dependency15*
dependency16* dependency17* dependency18* dependency19* dependency20*
dependency21* dependency22* dependency23* dependency24* dependency25*
dependency26* dependency27* dependency28* dependency29* dependency30*
dependency31* dependency32* dependency33* dependency34* dependency35*
dependency36* dependency37* dependency38* dependency39* dependency40*
dependency41* dependency42* dependency43* dependency44* dependency45*
dependency46* dependency47* dependency48* dependency49* dependency50*
dependency51* dependency52* dependency53* dependency54* dependency55*
0 upgraded, 0 newly installed, 55 to remove and 222 not upgraded.
After this operation, 727 MB disk space will be freed.
$ sudo aptitude purge package_name
The following packages will be REMOVED:
package_name{p} dependency1{u} dependency2{u} dependency4{u} dependency5{u}
dependency6{u} dependency8{u} dependency9{u} dependency10{u}
dependency11{u} dependency12{u} dependency13{u} dependency14{u} dependency15{u}
dependency16{u} dependency17{u} dependency18{u} dependency19{u}
dependency21{u} dependency22{u} dependency23{u} dependency24{u} dependency25{u}
dependency26{u} dependency27{u} dependency28{u} dependency30{u}
dependency31{u} dependency32{u} dependency33{u} dependency34{u} dependency35{u}
dependency36{u} dependency38{u} dependency39{u} dependency40{u}
dependency41{u} dependency42{u} dependency43{u} dependency44{u} dependency45{u}
dependency46{u} dependency47{u} dependency48{u} dependency49{u} dependency50{u}
dependency51{u} dependency52{u} dependency53{u} dependency54{u} dependency55{u}
dependency56{u} dependency57{u} dependency58{u} dependency59{u} dependency60{u} dependency61{u}
0 packages upgraded, 0 newly installed, 61 to remove and 222 not upgraded.
Need to get 0 B of archives. After unpacking 1,133 MB will be freed.
apt package-management dependencies uninstall aptitude
apt package-management dependencies uninstall aptitude
edited Dec 18 '18 at 3:41
asked Dec 17 '18 at 4:00
Pulkit Lall
416
416
@user535733 Sorry, but will not be able to give exact names of dependencies due to some policy.
– Pulkit Lall
Dec 17 '18 at 6:53
add a comment |
@user535733 Sorry, but will not be able to give exact names of dependencies due to some policy.
– Pulkit Lall
Dec 17 '18 at 6:53
@user535733 Sorry, but will not be able to give exact names of dependencies due to some policy.
– Pulkit Lall
Dec 17 '18 at 6:53
@user535733 Sorry, but will not be able to give exact names of dependencies due to some policy.
– Pulkit Lall
Dec 17 '18 at 6:53
add a comment |
1 Answer
1
active
oldest
votes
aptitude is more aggressive than apt-get about resolving package dependencies. aptitude remembers which packages were explicitly requested and which packages were only installed due to dependencies. It will automatically uninstall packages which were not explicitly requested when they are no longer needed.
apt-get treats packages requested explicitly and their dependencies the same. apt-get autoremove
doesn't remove packages installed only as dependencies, it removes orphaned dependencies. It can't tell whether a left over package was installed with intent or as a dependency so it leaves it, whereas aptitude would know and remove it.
Source: revised from https://unix.stackexchange.com/questions/767/what-is-the-real-difference-between-apt-get-and-aptitude-how-about-wajig/772#772
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1102467%2fwhy-does-apt-get-autoremove-uninstall-less-packages-than-aptitude-remove-does%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
aptitude is more aggressive than apt-get about resolving package dependencies. aptitude remembers which packages were explicitly requested and which packages were only installed due to dependencies. It will automatically uninstall packages which were not explicitly requested when they are no longer needed.
apt-get treats packages requested explicitly and their dependencies the same. apt-get autoremove
doesn't remove packages installed only as dependencies, it removes orphaned dependencies. It can't tell whether a left over package was installed with intent or as a dependency so it leaves it, whereas aptitude would know and remove it.
Source: revised from https://unix.stackexchange.com/questions/767/what-is-the-real-difference-between-apt-get-and-aptitude-how-about-wajig/772#772
add a comment |
aptitude is more aggressive than apt-get about resolving package dependencies. aptitude remembers which packages were explicitly requested and which packages were only installed due to dependencies. It will automatically uninstall packages which were not explicitly requested when they are no longer needed.
apt-get treats packages requested explicitly and their dependencies the same. apt-get autoremove
doesn't remove packages installed only as dependencies, it removes orphaned dependencies. It can't tell whether a left over package was installed with intent or as a dependency so it leaves it, whereas aptitude would know and remove it.
Source: revised from https://unix.stackexchange.com/questions/767/what-is-the-real-difference-between-apt-get-and-aptitude-how-about-wajig/772#772
add a comment |
aptitude is more aggressive than apt-get about resolving package dependencies. aptitude remembers which packages were explicitly requested and which packages were only installed due to dependencies. It will automatically uninstall packages which were not explicitly requested when they are no longer needed.
apt-get treats packages requested explicitly and their dependencies the same. apt-get autoremove
doesn't remove packages installed only as dependencies, it removes orphaned dependencies. It can't tell whether a left over package was installed with intent or as a dependency so it leaves it, whereas aptitude would know and remove it.
Source: revised from https://unix.stackexchange.com/questions/767/what-is-the-real-difference-between-apt-get-and-aptitude-how-about-wajig/772#772
aptitude is more aggressive than apt-get about resolving package dependencies. aptitude remembers which packages were explicitly requested and which packages were only installed due to dependencies. It will automatically uninstall packages which were not explicitly requested when they are no longer needed.
apt-get treats packages requested explicitly and their dependencies the same. apt-get autoremove
doesn't remove packages installed only as dependencies, it removes orphaned dependencies. It can't tell whether a left over package was installed with intent or as a dependency so it leaves it, whereas aptitude would know and remove it.
Source: revised from https://unix.stackexchange.com/questions/767/what-is-the-real-difference-between-apt-get-and-aptitude-how-about-wajig/772#772
edited Dec 17 '18 at 7:27
answered Dec 17 '18 at 7:21
karel
57.5k12127146
57.5k12127146
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1102467%2fwhy-does-apt-get-autoremove-uninstall-less-packages-than-aptitude-remove-does%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
@user535733 Sorry, but will not be able to give exact names of dependencies due to some policy.
– Pulkit Lall
Dec 17 '18 at 6:53