The following packages have been kept back:

I am running Debian, and get the following message when I do an apt-get upgrade

The following packages have been kept back:


What does this message mean, and how can I upgrade rails?

This is the command I used to install rails. Before doing this I added

testing to my /etc/apt/sources.list using apt-setup.

apt-get install rails libapache2-mod-fcgid libfcgi-ruby1.8 libmysql-ruby

3 Replies

It means that the new rails package has different dependencies that the older one which is installed, and that at least one of the dependencies of the new rails package is not installed. Just run "apt-get install rails" and you'll see that in addition to the new rails package, there are other packages which need to be installed.

OK, I tried running apt-get install rails and got the following message:

The following packages have unmet dependencies:

rails: Depends: rake (> 0.7.0) but 0.5.3-1 is to be installed

E: Broken packages

OK, so I tried to install rake.

[email protected]:~$ sudo apt-get --simulate install rake
Reading Package Lists... Done
Building Dependency Tree... Done
rake is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

Here is what I get with showpkg. I'm not sure which rake is installed, or how to specify the correct one.

[email protected]:~$ apt-cache showpkg rake

Package: rake




Reverse Depends:


rails,rake 0.7.0


0.7.1-1 - ruby (4 1.8)

0.5.3-1 - ruby (4 1.8)


0.7.1-1 -

0.5.3-1 -

Reverse Provides:

> …how to specify the correct one.

This will probably do the job for you:

sudo apt-get install rake/testing rails




Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct