3

I am new to xubunutu and linux, my question is about how dependencies are removed from the system when we uninstall a package that caused them to install.

so consider this case that I install a package called test.

 apt-get install test

However this often gives a message saying following new packages will be installed as well. Assuming it installs 50 other packages as dependencies and continue to accept and install them.

Now later on I install other packages as well, assume if the newly installed packages use 10 out of those dependencies installed earlier.

I want to know when I remove the main package (test) in future using the command

apt-get remove test

Will it automatically workout 50 - 10 packages and remove them ?

or will it not remove any of the 50 packages ?

or will it remove all the 50 packages that were installed with test package?

Thanks,

5

I believe it depends on the package. Obviously, some dependencies are also dependencies for other packages, so those will stay installed.

However, if you run sudo apt-get remove test or sudo apt-get purge test, then it will let you know that there are a bunch of dependencies that can be removed (albeit manually via sudo apt-get autoremove) if there are any dependencies that only that package relied on.

Now, I don't have a super credible source (no Debian or Ubuntu documentation) currently (searching now.) But, what I do have is what I get in the terminal when I try to remove a package (shutter) in my case:

enter image description here

Obviously, there would be a bunch of dependencies left over that would have to be manually removed.

From the man page for apt-get:

autoremove

autoremove is used to remove packages that were automatically installed to satisfy dependencies for other packages and are now no longer needed.

Hope this helped! I'll look for a more credible source just to augment my answer.

0

To remove package test from your system, you would run:

sudo apt-get remove test

To remove package test and its configuration files from your system, you would run:

sudo apt-get remove --purge remove test

Or you could use synaptic package manager to the same

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.