Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a Debian 5 VPS which runs a LAMP stack and Redmine (Ruby) and DokuWiki for myself and some clients to use for organisational purposes.

A apt-get upgrade request says that a lot of packages will be held back, but a apt-get dist-upgrade request seems to result in a scary-looking (to me) list of packages that will be removed. Will I need them for LAMP?

Here's the story from the command line:

user@machine:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have been kept back:
  bind9 bind9-host bind9utils dnsutils libapache2-mod-php5 libbind9-50 libdns55 libisccc50
  libisccfg50 liblwres50 mysql-client-5.1 mysql-server-5.1 mysql-server-core-5.1 php5 php5-apc
  php5-cli php5-common php5-curl php5-gd php5-imagick php5-imap php5-mcrypt php5-mysql
  php5-suhosin php5-tidy
0 upgraded, 0 newly installed, 0 to remove and 25 not upgraded.
user@machine:~$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED
  libapache2-mod-php5 libdns55 libisc52 mysql-server mysql-server-5.1 php5 php5-cli php5-curl
  php5-gd php5-imagick php5-imap php5-mcrypt php5-mysql php5-tidy
The following NEW packages will be installed
  libdb4.8 libdns58 libisc50 liblqr-1-0 libltdl7 libonig2 libqdbm14
The following packages have been kept back:
  mysql-client-5.1
The following packages will be upgraded:
  bind9 bind9-host bind9utils dnsutils libbind9-50 libisccc50 libisccfg50 liblwres50
  mysql-server-core-5.1 php5-apc php5-common php5-suhosin
12 upgraded, 7 newly installed, 14 to remove and 1 not upgraded.
Need to get 7698kB of archives.
After this operation, 25.9MB disk space will be freed.
Do you want to continue [Y/n]? n
Abort.

Is it safe to go ahead with the dist-upgrade?

Updating with output from apt-get dist-upgrade -V:

The following packages will be REMOVED
   libapache2-mod-php5 (5.3.5-0.dotdeb.1)
   libdns55 (9.6.ESV.R2+dfsg-0+lenny1)
   libisc52 (9.6.ESV.R1+dfsg-0+lenny2)
   mysql-server (5.1.54-0.dotdeb.1)
   mysql-server-5.1 (5.1.54-0.dotdeb.1)
   php5 (5.3.5-0.dotdeb.1)
   php5-cli (5.3.5-0.dotdeb.1)
   php5-curl (5.3.5-0.dotdeb.1)
   php5-gd (5.3.5-0.dotdeb.1)
   php5-imagick (5.3.5-0.dotdeb.1)
   php5-imap (5.3.5-0.dotdeb.1)
   php5-mcrypt (5.3.5-0.dotdeb.1)
   php5-mysql (5.3.5-0.dotdeb.1)
   php5-tidy (5.3.5-0.dotdeb.1)
The following NEW packages will be installed
   libdb4.8 (4.8.24-1~bpo50+1)
   libdns58 (9.6.ESV.R3+dfsg-0+lenny1)
   libisc50 (9.6.ESV.R3+dfsg-0+lenny1)
   liblqr-1-0 (0.1.0-1)
   libltdl7 (2.2.6b-2~bpo50+1)
   libonig2 (5.9.1-1)
   libqdbm14 (1.8.74-1.4)
The following packages have been kept back:
   mysql-client-5.1 (5.1.54-0.dotdeb.0 => 5.1.54-0.dotdeb.1)
The following packages will be upgraded:
   bind9 (9.6.ESV.R1+dfsg-0+lenny2 => 9.6.ESV.R3+dfsg-0+lenny1)
   bind9-host (9.6.ESV.R1+dfsg-0+lenny2 => 9.6.ESV.R3+dfsg-0+lenny1)
   bind9utils (9.6.ESV.R1+dfsg-0+lenny2 => 9.6.ESV.R3+dfsg-0+lenny1)
   dnsutils (9.6.ESV.R1+dfsg-0+lenny2 => 9.6.ESV.R3+dfsg-0+lenny1)
   libbind9-50 (9.6.ESV.R1+dfsg-0+lenny2 => 9.6.ESV.R3+dfsg-0+lenny1)
   libisccc50 (9.6.ESV.R1+dfsg-0+lenny2 => 9.6.ESV.R3+dfsg-0+lenny1)
   libisccfg50 (9.6.ESV.R1+dfsg-0+lenny2 => 9.6.ESV.R3+dfsg-0+lenny1)
   liblwres50 (9.6.ESV.R1+dfsg-0+lenny2 => 9.6.ESV.R3+dfsg-0+lenny1)
   mysql-server-core-5.1 (5.1.54-0.dotdeb.0 => 5.1.54-0.dotdeb.1)
   php5-apc (5.2.17-0.dotdeb.0 => 5.3.5-0.dotdeb.1)
   php5-common (5.2.17-0.dotdeb.0 => 5.3.5-0.dotdeb.1)
   php5-suhosin (5.2.17-0.dotdeb.0 => 5.3.5-0.dotdeb.1)
12 upgraded, 7 newly installed, 14 to remove and 1 not upgraded.
Need to get 7698kB of archives.
After this operation, 25.9MB disk space will be freed.
Do you want to continue [Y/n]? 
share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted

No, it looks like quite a lot of your php and mysql stuff is getting removed and not being replaced. I think in a case like this, it would be better to do your upgrade through aptitude or dselect or some other front end where you can find out WHY this is happening and fix it, or at least instruct it to re-add the packages to the list of packages to install so it will all be taken care of in one operation.

Were these all installed from lenny, or did you use some other repository? The fact that mysql-client-5.1 is still being kept back on a dist-upgrade suggests that either something has gotten pinned to a specific version that needs to be unpinned, or that mysql-client-5.1 came from somewhere that doesn't provide a clear upgrade path to squeeze.

EDIT Based on the output with -V

These packages were installed from the dotdeb repository, whose purpose is to package the latest and greatest PHP and MySQL packages since Debian is usually a few versions behind.

A couple of things: check to see if /etc/apt/preferences exists, if so, read through it and see if there's anything other than php and mysql that is pinned to a specific release. If it exists and it's all php and mysql, rename it to .bak. Second, make sure that dotdeb's squeeze repository is configured in /etc/apt/sources.list:

deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all

Based on the fact that you have PHP 5.3, it probably means you need to remove the old lines referring to http://php53.dotdeb.org

Once you've done this, run apt-get update so it gets the current package lists, then apt-get dist-ugprade. If this still doesn't clear it up, update the question with the new dist-upgrade -V

share|improve this answer
    
I believe they were all installed from lenny (UK mirror), but it wasn't me that did it as I paid someone else to set it up for me. But the sources don't look exotic to me. –  David Oliver Feb 22 '11 at 19:08
    
I've updated the question with the output of apt-get dist-upgrade -V - many thanks for your help. –  David Oliver Feb 22 '11 at 19:10
    
Yeah, it looks like you'll end up downgrading PHP. It may be worth finding exactly where these packages came from. –  Coops Feb 22 '11 at 19:12
1  
@David Oliver, You have have some 'dotdeb' packages mentioned. These are almost certainly not from an official repository. –  Zoredache Feb 22 '11 at 19:48
    
@David I've updated the answer to see about dealing with the dotdeb packages. Give it a shot and see if these changes will still remove PHP –  DerfK Feb 22 '11 at 20:23
show 1 more comment

Is it safe to go ahead with the dist-upgrade?

The only way you can be certain you will be safe is by performing a full system backup that you know how and can easily restore. Even better will be to copy your system into a VM and then test the upgrade there.

If you don't have the exact installation documented, or you don't have a good good backup then you should almost certainly not be upgrading to a new release on this box, if anything on it is even slightly important.

Have you considered asking the person who did the original install about what would be needed for an update?

share|improve this answer
    
Thanks for the advice on testing/backing up. Yes, asking the person who installed may well have been easier, but I'm trying to wean myself off of relying on third party pros and so decided to get some insights from others and to get involved with it myself. –  David Oliver Feb 23 '11 at 6:54
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.