Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I using apt in terminal to install an update. When i used apt-get -f install it showed

0 upgraded, 7 newly installed, 428 to remove and 3 not upgraded.
4 not fully installed or removed.
Need to get 5691kB of archives.
After this operation, 451MB disk space will be freed.
Do you want to continue [Y/n]?

I dont want to remove 428 packages. These are linked with other applications. (Some packages are Ruby1.8, Perl, python libraries and so on). How should i install the 7 packages without removing 428 packages.

share|improve this question
1  
What are those 7 packages? –  schaiba Feb 5 '13 at 17:38
    
You can try aptitude, and see if you can find a better dependency resolution. –  derobert Feb 5 '13 at 22:21
add comment

2 Answers

Then you'll need to look at what the dependencies are.

There is only one reason this would happen. You are explicitly requesting the install of a package that conflicts with a package that a large number of other packages depend on.

In other words, 428 packages depend on libfoo. Whatever you did is causing libfoo to be uninstalled, thus all of those other packages must be uninstalled.

$20 says you're mixing repositories between Ubuntu and something else, or you're mixing repositories for major release versions. Do you have some Debian, Mint or PPA sources?

share|improve this answer
    
Ya, I am mixing PPAs and Debians. How do i stop libfoo from getting uninstalled? –  Fr34K Feb 5 '13 at 18:21
    
Using a system like apt package dependencies and conflicts must be resolved. The only way to not make this happen is to not do whatever you're trying to do. Your only other option is to use dpkg with --force, but that will likely leave you with something broken (and possibly an unusable system). Long story short: don't do that. –  bahamat Feb 15 '13 at 0:21
add comment

Use apt-pin

http://jaqque.sbih.org/kplug/apt-pinning.html

It may take a little time to figure out exactly what package has all of those dependencies, but if you pin it, the rest will stay.

You may find using aptitude to identify and pin them to be easier, though:

http://wiki.debian.org/Aptitude

share|improve this answer
add comment

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.