This how-to was last updated: December 12th, 2006

This how-to is now broken down into 3 seperate parts. Part 1(one) will be used for doing a simple upgrade of your current KDE version. This option should only be used when you are upgrading within the same minor version numbers of KDE. Example: If you currently have KDE 3.5.4 installed and you want to have 3.5.5 installed, then you would use the upgrade portion of this how-to. If you have 3.4.2 installed and wish to have one of the 3.5.x versions installed, then you need to read and follow Part 2(two) of this how-to. These two sections are completely different from one another in many different ways. Part 3 is for reverting back to an older KDE version incase things don't work as you expected, are broken, or you just want to revert to an older version for no particular reason.

Disclaimer

This how-to has worked for myself as well as others and theoretically should work for you too. I am by no means responsible for anything that may go wrong on your system due to you following this how-to. If you feel this how-to isn't correct and shouldn't be used, then please don't use it.

What This How-To Accomplishes

So you want to upgrade your existing version of KDE via urpmi and you aren't sure what needs to be done on your end to prepare for it. Below is what I recommend and a way that has always worked for me. I will also suggest how to revert back to a previous version of KDE if for some reason things don't work, or you can't start KDE at all once you have done the upgrade.

Because this is an update/upgrade you should have no problems doing this while KDE is running. If you want, you can either exit out of KDE into another window manager or kill X completely and do this from a terminal.

Basic Information You Need Before Starting This How-To

I highly recommend that you do a full system backup FIRST before you do anything else. Make sure you atleast make a backup copy of your ~/.kde directory for sure. You might need it or something in it later. To make that backup perform the following command as normal user:

cp -a ~/.kde ~/.kde-old

I also recommend you remove all CD'S/DVD's from your sources before going any further with this how-to. You can ultimately remove ALL sources with the following command:

urpmi.removemedia -a

In various places in this how-to there will be commands that you need to perform. These commands will be within a blue code box to easily distinguish them. You might see at the end of a line a \ and wonder what that is. What that signifies is that the command is split across more than one line of text that can fit within that blue box. I suggest you copy and paste the commands, but you will need to leave out the \ or else the command will fail.

It is very important that you visit Urpmi-Addmedia and setup online sources for Main, Main Updates, Contrib, Contrib Updates and PLF(both free and nonfree(you do NOT have to pay for the nonfree version)). If you don't, you WILL have issues trying to perform this update/upgrade appropriately without problems.

Part One - Upgrading Your Current KDE Install

Finding Out Your Current Version Of KDE

To find out the currently installed version of KDE perform this command:

kde-config --version | grep KDE

Adding Your New KDE Source

Now you have all of your old KDE removed and you are ready to begin the fresh install of the new version of KDE. Easiest way to do it is to add an online source that has the rpms in it. Below is the code to add my personal repository as an online media source from my SoS(SeerOfSouls) RPM Repository that can be found at SeerOfSouls(SoS)

urpmi.addmedia SoS-KDE355 \ 
http://seerofsouls.com/mandriva/2007/i586/KDE355/ with hdlist.cz

The above media source is real, however yours may be totally different. This one was used merely as an example, but can be used if you so choose to do so.

You also need to import the SoS packagers keys to avoid getting warnings about bad signatures on the rpms since SoS signs all of its rpms. To import the key(s) you need to perform the following commands as root user:

rpm --import http://seerofsouls.com/keys/hawkwind.asc

rpm --import http://seerofsouls.com/keys/benja.asc

Performing The Upgrade

Once you have the source(s) added you then need to perform the following command:

urpmi.update -a && urpmi --auto-select --auto

Once the above commands are done your new version of KDE should be ready to be used as long as there were no errors that occured. If you did this while KDE was still running, you will probably need to restart your current X session. If you did this from within a different window manager, then you just need to logout of it and log into KDE.

Part Two - Removing KDE Then Installing KDE Fresh

Finding Out Your Current Version Of KDE

To find out the currently installed version of KDE perform this command:

kde-config --version | grep KDE

Adding Your New KDE Source

Now you have all of your old KDE removed and you are ready to begin the fresh install of the new version of KDE. Easiest way to do it is to add an online source that has the rpms in it. Below is the code to add my personal repository as an online media source from my SoS(SeerOfSouls) RPM Repository that can be found at SeerOfSouls(SoS)

urpmi.addmedia SoS-KDE355 \ 
http://seerofsouls.com/mandriva/2007/i586/KDE355/ with hdlist.cz

The above media source is real, however yours may be totally different. This one was used merely as an example, but can be used if you so choose to do so.

You also need to import the SoS packagers keys to avoid getting warnings about bad signatures on the rpms since SoS signs all of its rpms. To import the key(s) you need to perform the following commands as root user:

rpm --import http://seerofsouls.com/keys/hawkwind.asc

rpm --import http://seerofsouls.com/keys/benja.asc

I strongly urge you to read the top section of this page. Above the Part One section is some VERY IMPORTANT information that you need to know and understand. If you fail to read it and do as it suggests then I can NOT be responsible for what might happen if you follow the steps below this warning.

Removing KDE With One Command

Secondly, I highly recommend you remove your current installed version of KDE if there is one installed. Believe it or not, this can be done with one simple command.

rpm -e --nodeps `rpm -qa | grep -i kde | grep 3.5`

Please change/edit the 3.5 to whatever version you currently have installed of KDE.

It is also very important that you use ` in the command and not ' The ` can be found on most keyboards on the key immediately to the left of the number one(1) key.

Removing Kdevelop(precautionary measure)

You will also need to perform this command just to be extra safe:

rpm -e --nodeps kdevelop

Installing Your New KDE Version

Once you have the source added it's probably best to perform the following command:

urpmi kdebase kdeutils kdeaddons kdeaccessibility \ 
kdegames kdegraphics kdebase-kdm-config-file kdebase-kdm kdemultimedia

Some Helpful Information

The above command should install quite a few packages. It could install more, just depends on what you currently have installed on your system and what all is actually needed. I do suggest that you visit Urpmi-Addmedia and add online sources for Main, Main Updates, Contrib, Contrib Updates and PLF(both free and nonfree). This will help in getting any other package(s) that might be needed that we might not have in the SoS repository.

Once that command finishes then your new version of KDE should be installed and ready to go. However, since you previously removed all of KDE prior to this install there will be many apps you don't have installed on the system any longer. Please make sure you urpmi them as well or else they will be non-existant and will not run. An example of this would be krusader, kwallet, kontact and many other things.

You can and should test the installation by starting a second X session, assuming your video card supports this. You can and should also test it after a reboot just to verify everything is ok. Also take note that KDE has a problem updating some image files, therefore if you click on the Star Menu in the bottom left corner, it will more than likely say it's KDE 3.4. However, if you go to any of the About KDE screens you will see it clearly states 3.5.5. This has been a known issue for sometime and is rather difficult to fix. The fix is beyond the scope of this how-to.

Part Three - How To Revert Back To An Older KDE Version

Help Me, Things Are Broken!

So you've tested things and they don't work as expected and you wish to revert back to a previous version of KDE. Below is a quick rundown of how to do so.

Removing KDE Again With One Command

Again, you will need to remove all of the currently installed version of KDE that you just installed. Perform the following commands to do so:

rpm -e --nodeps `rpm -qa | grep -i kde | grep 3.5.5`

Please substitute the 3.5.5 for whatever version you just installed that isn't working.

Removing Your Old KDE Source

This will remove all of KDE as we mentioned above before doing an install. You will also need to remove the KDE355 source from SoS, assuming you used ours of course, from your urpmi database. To do so, perform the following command:

urpmi.removemedia SoS-KDE355

If you didn't use the SoS-KDE355 repo, then you can get a list of what sources you have setup, by performing this command:

Listing Your Current Media Sources

To list all of the media you currently have setup for urpmi, perform the following command:

urpmq --list-media

Then remove which ever one(s) you set up for KDE stuff.

Installing An Old KDE Version

This how-to assumes that you followed the directions above about adding online sources for Main, Main Updates, Contrib, Contrib Updates and PLF(both free and nonfree(you do NOT have to pay for the nonfree version)) from Urpmi-Addmedia. Once you have these steps completed, then simply performing:

urpmi kdebase kdeutils kdeaddons kdebase-kdm-config-file kdebase-kdm

should get you a previous version of KDE.

Bug Information

For those of you who have followed this how-to and experience no screensavers in the KDE control center, please visit this link and read the fix: Bug #17919

If you have questions/comments about the install of KDE, or you want to report good news, or even a bug, please visit the following SoS forums: SoS Forums