Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Starting with a Ubuntu server, I wanted a window manager, so I installed xfce4.

I used

sudo apt-get install xfce4

to do this. To remove it, I used

sudo apt-get remove --purge xfce4  

which didn't work, and neither did

sudo dpkg purge xfce4

as evidenced 1) startx launches the xfce desktop, and 2) apt-cache search xfce4 returns a long list of installed packages.

So, how can I get rid of xfce4 and it's dependencies?

share|improve this question

5 Answers 5

up vote 20 down vote accepted

xfce4 itself is a meta-package that will install a default configured xfce desktop environment.

In most cases the base files that comes with xfce4 are:

xfconf, xfce4-utils, xfwm4, xfce4-session, thunar, xfdesktop4, exo-utils

So you can do

sudo apt-get purge xfconf xfce4-utils xfwm4 xfce4-session thunar xfdesktop4 exo-utils xfce4-panel xfce4-terminal

Then most of the package that were associated with these package become autoremovable so you can run

sudo apt-get autoremove

OR

Almost all xfce4 package depend upon libxfce4util-common. Just purge that one and you remove everything related to xfce

share|improve this answer
1  
@sugarchalise thanks for the help. –  David Sep 2 '11 at 19:34

Note that apt-cache is not showing you installed packages, but rather those which are known about.

To test what you have installed, you might like to use:

dpkg --get-selections | grep xfce

Be sure to look at the second output column to see whether it's installed or deinstalled.

After purging all xfce packages, the above command returns no output on my machine.

share|improve this answer

Aptitude can do this by using package search ~n and using -P to prompt when adding or removing packages.

sudo aptitude -P remove ~nxfce4

Substitute remove with purge if you would like to remove the system configuration files:

sudo aptitude -P purge ~nxfce4

To remove user config files (use -r with care - recursive delete!!):

sudo rm -r ~/.config/xfce4
share|improve this answer
sudo aptitude purge xfce4 desktop-base exo-utils gtk2-engines-xfce libexo-1-0 libexo-common libgarcon-1-0 libgarcon-common libthunarx-2-0 libtumbler-1-0 libxfce4ui-1-0 libxfce4util-bin libxfce4util-common libxfce4util4 libxfconf-0-2 orage tango-icon-theme thunar thunar-data thunar-volman tumbler tumbler-common xfce-keyboard-shortcuts xfce4 xfce4-appfinder xfce4-mixer xfce4-panel xfce4-session xfce4-settings xfce4-utils xfconf xfdesktop4 xfdesktop4-data xfwm4 xfwm4-themes

Will remove everything related with xfce4 in your computer. You will need to install aptitude first if you haven't:

sudo apt-get install aptitude
share|improve this answer

I think you should try aptitude.

Install it: sudo apt-get install aptitude

Maybe you will have first to install again xfce4: sudo aptitude install xfce4

Now purge it: sudo aptitude purge xfce4


ps.: I've never installed xfce4 but the command apt-cache search xfce4 also gives me this output.

share|improve this answer
    
thanks for the advice, but startx still launches xfce –  David Sep 2 '11 at 19:27

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.