Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
1  
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 at 8:49

1 Answer 1

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.

Source: https://help.ubuntu.com/community/InstallingSoftware

share|improve this answer

Your Answer

 
discard

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.