Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I uninstalled some packages with apt-get remove. In addition to the selected packages the Okular document viewer was removed, which was running on my computer long before the other packages. Is there any way to prevent those "side effects", so that I don't have to reinstall programms again?

share|improve this question
You could use dpkg -r [packagename] to remove only the package files, instead of apt-get. However, this is not usually what you want, because you will end up with unused files (apt-get autoremove will remove these for you). – Jos Jun 16 '14 at 8:49
up vote 3 down vote accepted

Okular depended on some or all of the packages your removed. That's why it was removed too. When you install a program, its dependencies must be installed at the same time, if you remove a dependency, the parent program is removed too.

Programs often use some of the same files as each other. Rather than putting these files into each package, a separate package can be installed to provide them for all of the programs that need them. So, to install a program which needs one of these files, the package containing those files must also be installed. When a package depends on another in this way, it is known as a package dependency. By specifying dependencies, packages can be made smaller and simpler, and duplicates of files and programs are mostly removed.

When you install a program, its dependencies must be installed at the same time. Usually, most of the required dependencies will already be installed, but a few extras may be needed, too. So, when you install a package, don't be surprised if several other packages are installed too - these are just dependencies which are needed for your chosen package to function properly.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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