Get rid of more DEs on Manjaro i3 - RESOLVED

I wanted to show a colleague the rich selection possiblities of Desktop Environments on my well established Manjaro i3, so installed KDE, GNOME, XFCE, LXDE, Enlightement, Budgie and Deepin. I was able to select which one to start at the password prompt.

He was amazed, so the goal was reached, he plans to try one of them.

Afterwards I tried to get rid of them as I don't plan to use them regularly even if they are nice. :slightly_smiling_face: It was harder than I thought first, some dependency problems arose. I uninstalled what I was able to, then realized that the greeter has been uninstalled as well, GUI was not working, so installed XFCE using command prompt. It worked, got i3 back as well, but the selection of the not 100% uninstalled DEs were still present in the menu (most of them were not working).


  1. How can I get back my lovely i3 without reinstalling the system?

  2. Can I install Manjaro i3 from the install pendrive without losing my files?

  3. How can I get rid of the extra, non working entries of DE selection?

+1) What is a good method showing more DEs as mine does not seem optimal.

Thanks in advance

You can remove them, but it will be something of a pain. Go back through your pacman log from when you installed them and remove all the packages that were installed. Be careful not to remove anything you need for i3.

Boot the live isos in a VM?


Just roll the system back with timeshift. :wink:


i wouldnt dream of doing something like this without quickly running a timeshift beforehand as i've done many many times before when doing things i knew would likely break something.

i suppose i should try and say something helpful, on top of what @dalto mentioned, since some of the packages/dependencies of other DE's likely replaced/removed some of the i3 packages. after your done uninstalling all those DE's and the dependencies that came with them you should probably reinstall the list of i3 packages instead of trying to avoid removing them which may prove difficult. your .config files will remain so you should be good as long as you re-install all the pkg's you had before


This is the type of help post I dislike but feel compelled to respond. It's the nice version of "you broke it, you bought it.":

You did it, you undo it. It's one of those things should be researched beforehand.

But that's all after the fact. You've been given good advice here, though this and similar topics have had solutions posted before--multiple times--and a search would have revealed them without the need for your help request.

Thanks @dalto,

I have not known pacman has a log, this is a nice idea.

@tbg, @dglt : I have not set up timeshift unfortunately, and not heard it exists for linux but thanks, I will check it and set up for future.

@dglt: sure I will need to reinstall i3 and other parts of the system :slight_smile:

@c00ter : actually I did search beforehand, probably focused on i3 and the other DEs too much and that is why found nothing. With all my respect I would like to point to the name of this part of the forum: "Newbie Corner". However I totally agree with you: it was my fault and I have to repair it. Just wanted to get some help of the more knowledgeable manjaro users, what suggestions they have.

Thanks for all of you.


I was able to restore the system, i3 runs well, no more DEs are installed.
The winning idea was of @dalto, I used pacman log file, searched for the mass install, it was on a specific day, so it was easy to get all the entries from the log, and the same for the uninstall day. For simplicity I grepped all related content to a new file, then also used grep and cut to create a list of installed packages and another of the removed ones. Then a simple for loop iterated thru all the installed packages and checked (using grep) if they were already removed. If not yet, then pacman was asked to remove that package. I had to re-run the same command line cc. 15 times, till most of the packages were gone. Then searched for conflicting package names in the results and removed the conflicting packages iterating thru them. Repeated the first method some times additionally and finally all added packages were gone.
There were some packages removed at mass install because of incompatibility with the new packages, I re-installed them using another loop.
Then the system was clean enough but the GUI still did not start, so just done the dumb and easy way and booted a recent manjaro i3 pendrive, queried all the installed packages to a file, booted my normal setup and queried the installed packages here, too. Then simply installed everything that was missing. Rebooted and -tada!- everything works, no more extra DEs... The only change I spotted is the changed background image at login screen and a different looking GRUB menu.

So thanks again for your help.


some of the commands I used, possible help for future readers

less /var/log/pacman.log
grep "^\[2019-05-20" /var/log/pacman.log | grep " installed "  | cut -d " " -f 5 > pac4_felrakva
grep "^\[2019-05-22" /var/log/pacman.log | grep " removed "  | cut -d " " -f 5 > pac5_letorolve
(while read -u 4 sor; do if ! grep -q $sor pac5_letorolve ; then  echo  "$sor" ; fi; done ; echo) 4< pac4_felrakva > pac7_torlendo
while read sor; do echo "*** $sor *** "; yes|pacman -R $sor; done < pac7_torlendo | tee -a pac9_torles
grep -c "Removed Size" pac9_torles
grep -B 5 " breaks " pac9_torles| cut -d ":" -f 3 | sort -u > pac10_maradek
while read sor; do echo "*** $sor *** "; yes|pacman -Rs $sor; done < pac10_maradek | tee -a pac11_maradektorles
grep "^\[2019-05-20" /var/log/pacman.log | grep " removed " | cut -d " " -f 5 > pac12_toroltvisszarakas
while read sor; do echo "*** $sor *** "; yes|pacman -S $sor; done < pac12_toroltvisszarakas | tee pac12_toroltvisszarakva
pacman -Q > mypc-pacman-Q.txt
cut -d " " -f 1 mypc-pacman-Q.txt > mypc-pacman-Q-csomagok
 (while read -u 4 sor; do if ! grep -q $sor mypc-pacman-Q-csomagok ; then  echo  "$sor" ; fi; done ; echo) 4< manjaro-i3-pacman-Q-csomagok > manjaro-mypc-felrakando
while read sor; do echo "*** $sor ***"; yes|pacman -S $sor; done < manjaro-mypc-felrakando | tee -a manjaro-mypc-felrakva

edited to have correct syntax highlight

1 Like

Format code:

Information on how to properly post hardware specs and logs:

Please format any terminal output with three backticks before and after, as shown in this picture:


Cool beans. :slight_smile: Please, then, when making a help request, it's polite to post what steps you taken...researches, what you've tried & what you haven't, etc. That helps those that would help you without wasted effort on their part.

As you've noticed, we have some extremely well versed Linux users here, and no problem is too large or small for them to help with. The fact you've chosen to do more than a simple re-install shows you're up to the task. I tip my hat to you. :man_dancing:


thanks @tbg, I have edited the post to have correct syntax highlight. It looks way better now :slight_smile:

1 Like

thanks @c00ter :+1: I will keep it in mind in future posting.
And thanks for both of you and the community to help others, creating a better world to live in. Respect