# How to completely uninstall KDE?



## rloc (Jul 22, 2010)

I tried to upgrade from KDE 3.5.8 to KDE4 and now get this when I do "startkde"


```
/libexec/ld-elf.so.1: Shared object "libjpeg.so.9" not found, required by kstartupconfig
/libexec/ld-elf.so.1: Shared object "libjpeg.so.5" not found, required by kde-config
/libexec/ld-elf.so.1: Shared object "libjpeg.so.9" not found, required by inusertemp
startkde: call to inusertemp failed (temporary directories full?. check you installation.
```

These are numerous reports of this exact error on many forums but for some reason there does not seem to be a definitive answer to what seems to be a specific (and therefore identifiable) problem.

After trying all of the "try this" suggestions that I can find, I assume that I need to remove all traces of KDE (and its dependencies?) from my system and somehow start again.

The upgrade to KDE4 failed at the installation of qt4-sqlite3-plugin for reasons I have yet to discover.

All of these attempts to upgrade were done by using the latest ports and following the usual port installation procedures to the letter. 

Platform is FreeBSD 8.

Any ideas please?


----------



## sossego (Jul 22, 2010)

What path do you have for the executable?
 For KDE4.X it should be:

```
startx /usr/local/kde4/bin/startkde4
```
and .xinit should have the path above without startx.

Is libjpeg installed? Have you tried upgrading it?


----------



## wblock@ (Jul 22, 2010)

rloc said:
			
		

> I tried to upgrade from KDE 3.5.8 to KDE4 and now get this when I do "startkde"
> 
> 
> ```
> ...



The programs need a certain shared library, but it isn't present.  Often, that's caused by updating a port (the jpeg port here) but not updating all of the things that depend on it (KDE).  See
`# less +/20090719 /usr/ports/UPDATING`

pkg_libchk from sysutils/bsdadminscripts can detect what needs to be rebuilt, too.


----------



## fronclynne (Jul 22, 2010)

Something akin to `# pkg_delete -ndr qt\* kde\*`  (note: to actually have it do the removal, remove the [red]-n[/red] flag)

Then just make sure your ports tree is up-to-date, and try again.

If you use ports-mgmt/portupgrade it installs a tool called pkg_deinstall() which works quite well (and quite similarly to pkg_delete(1), except that it updates your /var/db/pkg/pkgdb.db for you and can work both up and down the dependency tree).


----------



## Anonymous (Jul 27, 2010)

Is 

`pkg_delete -dr kde`

(or is it 'qt' rather than 'kde'?) the consensus way to completely and safely remove kde without breaking anything else?

I built kde from a freshly sync'd ports tree, but the build didn't run to completion because a number of dependencies still couldn't be found/wouldn't build/yaddayadda.

My plan was to blow out the whole o/s install and begin again from scratch, but before that I decided to install xfce4 just for giggles.  It worked!  And beautifully, too.  Since it gives me everything I want, and who knows whether I could get such a beautiful install the next time, I want to purge kde now, if I can do it without breaking anything.  If there is no known-safe way to uninstall kde, then I'll just let the cursed thing take up disc space.


----------



## fronclynne (Jul 28, 2010)

AFIK, pkg_delete(1) only works up the tree (you can delete qt & kde and everything that depends upon them).  If you want to go the other way (deleting stuff that qt/kde depend upon) you'll need to use another tool.  I tend to prefer pkg_deinstall(1) from ports-mgmt/portupgrade.  Something like `# pkg_deinstall -Rr qt\* kde\*` would remove everything that depends on qt/kde, & everything that they depend upon that isn't required by some other port/package.  [red]-f[/red] would do some damage.

Also, if you're into it, ports-mgmt/pkg_cutleaves is quite handy.  Also learn to use the [red]-r[/red] & [red]-R[/red] flags to pkg_info(1).  (hint: they work exactly the opposite of portupgrade, which is distressing at times).


----------

