Doubts regarding the behaviour of 'autoremove' command and '--auto-remove' flag

Posted by Jasper Loy on Ask Ubuntu See other posts from Ask Ubuntu or by Jasper Loy
Published on 2011-02-26T06:16:17Z Indexed on 2011/02/26 7:32 UTC
Read the original article Hit count: 276

Filed under:

After reading several man pages and forums, I thought that running 'apt-get autoremove' without any following argument removes all unused dependencies left on the system, while running 'apt-get autoremove xxx' removes xxx together with its unused dependencies.

However I found this to be not true. Running 'apt-get autoremove xxx' not only removes xxx together with its unused dependencies, it also removes all other unused dependencies. So I tried to run 'apt-get remove --auto-remove xxx', thinking that this would remove only xxx and its unused dependencies. To my surprise, this also removed xxx, its unused dependencies and all other unused dependencies.

Is this the intended behaviour of the commands or a bug? Is there any quick way to remove xxx and its unused dependencies without removing other unused dependencies?

© Ask Ubuntu or respective owner

Related posts about apt-get