Super User is a question and answer site for computer enthusiasts and power users. 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

On my Debian system I seem to have a few packages in weird state. When I run upgrade, they are always to be intstalled:

grzes:/home/ga# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed
  libffi-dev libxmmsclient4 python-dev python-gobject-dev python-gtk2-dev python-gtk2-doc python2.5-dev xmms2-core
The following packages have been kept back:
  glade gnome-bin gpm kmplayer libgnorba27 libgnorbagtk0 lxde yelp
0 upgraded, 8 newly installed, 0 to remove and 8 not upgraded.
Need to get 0B/4616kB of archives.
After this operation, 22.0MB of additional disk space will be used.

But when I run autoremove they are to be removed (only to be installed later by dist-upgrade):

grzes:/home/ga# apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  python-gtk2-dev python-gtk2-doc libxmmsclient4 python-dev python2.5-dev libffi-dev xmms2-core python-gobject-dev
The following packages will be REMOVED
  libffi-dev libxmmsclient4 python-dev python-gobject-dev python-gtk2-dev python-gtk2-doc python2.5-dev xmms2-core
0 upgraded, 0 newly installed, 8 to remove and 8 not upgraded.
After this operation, 22.0MB disk space will be freed.

Any ideas how to fix it?

EDIT State before autoremove:

grzes:/home/ga# apt-cache policy python2.5-dev
python2.5-dev:                                
  Installed: 2.5.4-1                          
  Candidate: 2.5.4-1                          
  Version table:                              
 *** 2.5.4-1 0                                
        200 ftp://ftp.task.gda.pl testing/main Packages
        500 ftp://ftp.task.gda.pl unstable/main Packages
        100 /var/lib/dpkg/status                        
     2.5.2-15 0                                         
        100 ftp://ftp.task.gda.pl stable/main Packages

grzes:/home/ga# dpkg --get-selections | grep python2.5-dev
python2.5-dev                                   install

State after autoremove:

grzes:/home/ga# apt-cache policy python2.5-dev
python2.5-dev:
  Installed: (none)
  Candidate: 2.5.4-1
  Version table:
     2.5.4-1 0
        200 ftp://ftp.task.gda.pl testing/main Packages
        500 ftp://ftp.task.gda.pl unstable/main Packages
     2.5.2-15 0
        100 ftp://ftp.task.gda.pl stable/main Packages

grzes:/home/ga# dpkg --get-selections | grep python2.5-dev

sources.list

grzes:/home/ga# cat /etc/apt/sources.list
#deb ftp://ftp.icm.edu.pl/pub/Linux/distributions/debian/ testing main contrib non-free
deb ftp://ftp.task.gda.pl/debian/ stable main contrib non-free
deb ftp://ftp.task.gda.pl/debian/ testing main contrib non-free

#UNSTABLE
#deb ftp://ftp.icm.edu.pl/pub/Linux/distributions/debian/ unstable main contrib non-free
deb ftp://ftp.task.gda.pl/debian/ unstable main contrib non-free

#wine
deb http://wine.sourceforge.net/apt/ binary/

#skype
deb http://download.skype.com/linux/repos/debian/ stable non-free

#Unofficial
deb http://ftp.debian-unofficial.org/debian unstable main contrib non-free restricted
#deb http://ftp.debian-unofficial.org/debian testing main contrib non-free restricted
deb http://debian-multimedia.fx-services.com/ unstable main

#Google
deb http://dl.google.com/linux/deb/ stable non-free

#Opera
deb http://deb.opera.com/opera unstable non-free

#Cinerella
#deb http://www.kiberpipa.org/~minmax/cinelerra/builds/sid/ .

Preferences:

grzes:/home/ga# cat /etc/apt/preferences
Explanation: see http://www.argon.org/~roderick/apt-pinning.html
Package: *
Pin: release o=Debian,a=stable
Pin-Priority: 100

Package: *
Pin: release o=Debian,a=testing
Pin-Priority: 200

Package: *
Pin: release o=Debian,a=unstable
Pin-Priority: 500

Package: *
Pin: release o=Debian
Pin-Priority: -1
share|improve this question
1  
Can you post your sources.list (and preferences file if you have one) – theotherreceive Jul 15 '09 at 19:29
1  
Also post the output of 'apt-cache policy PACKAGE' on a few of them. Though I suspect this may have something to do with the packages being held back. Try aptitude to see what's going on (or "apt-get install glade" to try and force the upgrade) – derobert Jul 15 '09 at 19:53
1  
If packages are being held back in this way even when you do a dist-upgrade, then either you're mixing branches in your sources.list or you're running Sid (where this kind of thing happens, especially with Gnome). If you're not sure where the files are, it's /etc/apt/sources.list and /etc/apt/preferences. The preferences file may not exist, but the sources definitely do. – Telemachus Jul 16 '09 at 10:51
    
What is the state of these 8 packages in dpkg --get-selections? – CesarB Jul 18 '09 at 0:59
    
Added additional information. – Grzenio Jul 18 '09 at 7:41
up vote 3 down vote accepted

Have you tried using aptitude? It has better dependency handling, and will offer various solutions (hold/install/uninstall).

share|improve this answer
    
Cheers, this sorted things out! – Grzenio Jul 26 '09 at 8:13

Try and see if apt-get can fix it

apt-get install -f
share|improve this answer
    
It didn't do anything – Grzenio Jul 18 '09 at 7:42

Just try to remove them :

apt-get remove libffi-dev libxmmsclient4 python-dev python-gobject-dev python-gtk2-dev python-gtk2-doc python2.5-dev xmms2-core

and install them back manually if you need them :

apt-get install libffi-dev libxmmsclient4 python-dev python-gobject-dev python-gtk2-dev python-gtk2-doc python2.5-dev xmms2-core

Warnings:

  1. You will miss the autoremove feature since you installed them manually.
  2. And the removing can have nasty consequences such as removing other packages that you need. Just make a list of what package will disappear, and install them again afterwards.
share|improve this answer
    
If some other stuff depends on them, that could create a real mess... Isn't there some "refresh"/"reinstall" command for apt? – vonbrand Jan 17 '13 at 21:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .