Accidentally uninstalled everything, reinstalled it weirdly, now in a weird state

Hi fellow manjaro fans!
Recently I wanted to swap my mesa stack for a different build, but forgot to disable dependency checks. Thus, the operation has uninstalled a good 700 packages, among them xorg, many system packages, and desktop environments.
Luckily I kept my cool and used regex to compile the pacman log into a list of packages to reinstall, and now I got all of them back and everything works.
My question is, as I have 700 explicitly installed packages, how can I reset their state to what it was in the manjaro defaults, i.e. I guess mostly 'implicit'. As I understand, I might just get a very cluttered system within a few release cycles if I let them be flagged as explicit.

Kind regards,

A new installation would not have been more effective?


It takes me easily 10 hours to get every little kink of a computer installation evened out so that it reaches a level where I like it... :pleading_face: My computer is what fine wine is to some other individuals.

So you surely have a backup of a working system..
Restore one of those.

If you dont' have a backup let this be a (more or less welcome) reminder to start making backups.

That said: all of your package removal action should be recorded in /var/log/pacman.log.


I can recommond at least two topics from this search

  1. How to make a crash-proof backup for Manjaro
  2. How to backup your system using Clonezilla

Long time ago I created a routine for restoring my configs and personal data. Not so long ago I wrote an article describing the concept including reference files.

Reinstalling Manjaro with losing data is also possible - requires more work though


If your issue is only that some packages are now installed explicitly instead of as dependency you could fix it to a high degree by:

sudo pacman -D --asdeps $(pacman -Qq)
sudo pacman -D --asexplicit $(pacman -Qtq)

Nevertheless, it's probably not 100% bringing back the old configuration and you have to be careful when removing packages.


If you are still in honing your trouble shooting skills this article from Arch wiki is interesting

1 Like

Hi, I'm curious about those commands. What does -Qq and -Qtq mean?


Also many thanks for the links posted here, it has helped me get a better understanding of backup structures.

Curiosity is all good and fine, but please do some research yourself:

$ pacman -Qh
$ man pacman
1 Like

Okay, thought about it again and now I understand it. All the advice I got here is appreciated, and I will only mark one as solution because I can't mark all as solution, also I quite like this trick.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by