After cleaning up pacman, Manjaro doesn't start anymore

Hello community,

I am pretty new to Manjaro (~6 months) and have only basic experience with Linux, Command Line, etc., but I am constantly learning.

So, two days ago, I got a message from the system that the free disc space is becoming low and I wanted to clean up a little bit. After googling, I found a post in this forum where the following steps were recommended:

sudo pacman -Sc
sudo pacman -Qdt
sudo pacman -Rns $(pacman -Qtdq)
sudo journalctl --vacuum-size=50M

I followed the instruction and everything seemed fine, I could keep working and there were no problems. Then yesterday and today, I tried to start Manjaro again, but the computer gets stuck and only shows the Dell-Logo. I can get to the screen where I can chose between the Windows, Manjaro, and Advanced Manjaro Starting options, where I have the further following options:

Manjaro Linux (Kernel: 5.8.11-1-MANJARO x64)
Manjaro Linux (Kernel: 5.8.11-1-MANJARO x64 - fallback initramfs)
Manjaro Linux (Kernel: 5.7.19-2-MANJARO x64)
Manjaro Linux (Kernel: 5.7.19-2-MANJARO x64 - fallback initramfs)

The 5.8 ones also end up in the Dell-Logo screen, while the 5.7 ones end up with the following screen:

[FAILED] Failed to start Load Kernel Modules.
[FAILED] Failed to mount Mount unit for atomify, revision 153.
[FAILED] Failed to mount Mount unit for core, revision 10126.
[FAILED] Failed to mount Mount unit for core, revision 9993.
[FAILED] Failed to mount /boot/efi.
[DEPEND] Dependency failed for Local File Systems.
Your are in emergency mode. After logging in, type “journalctl -xb” to view system logs, “systemctl reboot” to reboot, “systemctl default” or “exit” to boot into default mode.
Give root password for maintenance
(or press Control-D to continue):

So I can log in and enter commands, but it is beyond my knowledge and experience what to do next. I thought that maybe booting into a Live environment with a Manjaro USB stick, saving all essential data and reinstalling Manjaro would be a unfavorable solution, but I was hoping that someone could help me on this and maybe I could learn a little bit in the process.

I tried to find a similar topic in this forum that could help me, but I wasn’t able to find one, so I hope I wasn’t blind when looking and this has been resolved somewhere already. Furthermore, I hope that I abide by the forum rules with this post.

Many thanks for any help and kind regards,

Kevin

You don’t have a good, working backup, eh?

Well, you’ve learned a painful lesson about blindly pasting commands into the terminal and executing them (as root, no less), without really knowing or understanding what they actually do. Don’t feel too bad, though; a lot of us have fallen victim to this, or fat-fingering a command (especially dd).

Considering

I opine that you’re best bet is:

  1. Make sure your personal data is safe.

  2. Re-install from scratch.

In theory, you could reverse what you’ve done, but IMO it is not worth the effort (and it won’t be trivial) for a doubtful outcome.

And when you get done, learn about and implement a backup strategy. It will save you some grief.

Good luck.

3 Likes

Thanks for your reply merlock.

Yes, I know this shouldn’t be the way to do things and I’ll be more thoughtful before copying commands in the future.

That’s what I feared but as you said, probably my best bet.

Thanks for the hint. I will look into backup stratgies.

Since you said

does that mean you actually know what I have done there? Would you mind to explain to me what I damaged in the process or what went wrong?

Thanks again for your opinion and help!

Regarding the low disc space, cleaning pacman’s cache usually free a decent amount by itself.
sudo pacman -Sc

1 Like

Thanks for the advice!

sudo pacman -Rns $(pacman -Qtdq)

This command looks for orphan packages (pacman -Qtdq) then removes them (pacman -Rns).

There is a possibility that you removed a package that you should not have.

Pacman Manual
https://www.archlinux.org/pacman/pacman.8.html

4 Likes

Thanks for the explanation. I already suspected something like that. I really need to learn more about packages. I always feel like I install stuff and dependencies and when I don’t need/use them anymore at a later time, then I do not know how to safely remove packages. It always feels like there are a lot of unused packages floating around but I’m not even sure if that is the case.

Also, thanks for hinting me to the manual.

First command told pacman to delete stuff from the cache I believe.

Second command was about looking for orphan programs.

I believe the 3rd command removed the programs identified as orphans

4th command I think is a systemd command that is deleting all journals until a set amount of disk space is reached.

I have seen threads recently where programs were being identified as orphans that were not.

That is most likely the problem.

2 Likes

Thank you for your explanation Lord_Phan!

That sounds like a good recommendation.

2 Likes

Why don’t you check the /var/log/pacman.log file? It will tell you exactly what you have removed and will help to identify the culprit.

Just boot into a live ISO and mount your filesystem then you can open that file. You are welcome to post the last part of it here (as it is a large file) showing what you’ve done.

1 Like

Thanks, I wasn’t aware of this log-file, else I would have looked into it already. I showed the relevant lines to a friend of mine and his comment was “Oh my god, just reinstall it from scratch, there were so many things removed, which shouldn’t have been removed that I don’t even know where to start.”

As I have already copied all my personal data to my Windows partition (sadly I just moved to a new country and do not have an external drive available), I guess I should start with the re-installation.

And if you like to have a look yourself, here are the relevant lines:

[2020-10-13T10:38:58+0200] [PACMAN] Running ‘pacman -Sc’
[2020-10-13T10:39:54+0200] [PACMAN] Running ‘pacman -Rns cmake electron4 gnome-shell-extension-openweather go js60 lib32-libdbusmenu-gtk2 lib32-libidn lib32-libindicator-gtk2 linux-latest linux-latest-nvidia-440xx linux57-nvidia-440xx python-pytoml qt5-styleplugins qt5ct wxgtk2 xorg-font-utils xorg-fonts-alias’
[2020-10-13T10:40:11+0200] [ALPM] transaction started
[2020-10-13T10:40:12+0200] [ALPM] removed xorg-fonts-alias (1.0.3-3)
[2020-10-13T10:40:12+0200] [ALPM] removed xorg-font-utils (7.6-6)
[2020-10-13T10:40:12+0200] [ALPM] removed xorg-mkfontscale (1.2.1-2)
[2020-10-13T10:40:12+0200] [ALPM] removed xorg-font-util (1.3.2-2)
[2020-10-13T10:40:12+0200] [ALPM] removed xorg-bdftopcf (1.1-2)
[2020-10-13T10:40:12+0200] [ALPM] removed wxgtk2 (3.0.5.1-1)
[2020-10-13T10:40:12+0200] [ALPM] removed qt5ct (1.1-1)
[2020-10-13T10:40:12+0200] [ALPM] removed qt5-styleplugins (5.0.0.20170311-24)
[2020-10-13T10:40:12+0200] [ALPM] removed python-pytoml (0.1.21-4)
[2020-10-13T10:40:12+0200] [ALPM] removed linux57-nvidia-440xx (440.100-17)
[2020-10-13T10:40:12+0200] [ALPM-SCRIPTLET] depmod: ERROR: could not open directory /lib/modules/5.7.19-2-MANJARO: No such file or directory
[2020-10-13T10:40:12+0200] [ALPM-SCRIPTLET] depmod: FATAL: could not search modules: No such file or directory
[2020-10-13T10:40:12+0200] [ALPM] removed linux-latest-nvidia-440xx (5.8-2)
[2020-10-13T10:40:12+0200] [ALPM] removed linux58-nvidia-440xx (440.100-18)
[2020-10-13T10:40:18+0200] [ALPM] removed linux-latest (5.8-2)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-libindicator-gtk2 (12.10.1-8)
[2020-10-13T10:40:18+0200] [ALPM] removed libindicator-gtk2 (12.10.1-9)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-libidn (1.36-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-libdbusmenu-gtk2 (16.04.0-4)
[2020-10-13T10:40:18+0200] [ALPM] removed libdbusmenu-gtk2 (16.04.0-4)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-libdbusmenu-glib (16.04.0-4)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-gtk2 (2.24.32-2)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-pango (1:1.46.2-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-libxft (2.3.3-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-libthai (0.1.28-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-libdatrie (0.2.12-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-fribidi (1.0.10-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-libxrandr (1.5.2-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-libxinerama (1.1.4-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-libxcomposite (0.4.5-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-libcups (2.3.3-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-krb5 (1.18.2-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-libldap (2.4.53-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-openssl (1:1.1.1.h-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-keyutils (1.6.3-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-e2fsprogs (1.45.6-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-gnutls (3.6.15-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-nettle (3.6-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-gmp (6.2.0-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-libidn2 (2.3.0-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-libunistring (0.9.10-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-gdk-pixbuf2 (2.40.0+6+g5432316df-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-libtiff (4.1.0-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-libjpeg-turbo (2.0.5-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-cairo (1.17.2+25+gaee96d175-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-pixman (0.40.0-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-fontconfig (2:2.13.91+48+gfcb0420-2)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-freetype2 (2.10.2-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-harfbuzz (2.7.2-1)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-libpng (1.6.37-3)
[2020-10-13T10:40:18+0200] [ALPM] removed lib32-atk (2.36.0-1)
[2020-10-13T10:40:18+0200] [ALPM] removed js60 (60.9.0-2)
[2020-10-13T10:40:18+0200] [ALPM] removed go (2:1.15.2-1)
[2020-10-13T10:40:18+0200] [ALPM] removed gnome-shell-extension-openweather (1.0.r243.g1c9dd03-1)
[2020-10-13T10:40:18+0200] [ALPM] removed pkgconf (1.7.3-1)
[2020-10-13T10:40:18+0200] [ALPM] removed electron4 (4.2.12-6)
[2020-10-13T10:40:18+0200] [ALPM] removed cmake (3.18.3-1)
[2020-10-13T10:40:18+0200] [ALPM] removed rhash (1.4.0-1)
[2020-10-13T10:40:18+0200] [ALPM] removed jsoncpp (1.9.3-1)
[2020-10-13T10:40:18+0200] [ALPM] transaction completed
[2020-10-13T10:40:18+0200] [ALPM] running ‘30-systemd-update.hook’…
[2020-10-13T10:40:18+0200] [ALPM] running ‘60-depmod.hook’…
[2020-10-13T10:40:18+0200] [ALPM] running ‘fontconfig.hook’…
[2020-10-13T10:40:18+0200] [ALPM] running ‘glib-compile-schemas.hook’…
[2020-10-13T10:40:18+0200] [ALPM] running ‘gtk-update-icon-cache.hook’…
[2020-10-13T10:40:19+0200] [ALPM] running ‘update-desktop-database.hook’…
[2020-10-13T10:40:19+0200] [ALPM] running ‘update-mime-database.hook’…
[2020-10-13T10:41:55+0200] [PACMAN] Running ‘pacman -Syu’
[2020-10-13T10:41:55+0200] [PACMAN] synchronizing package lists
[2020-10-13T10:41:55+0200] [PACMAN] starting full system upgrade

Assuming this was the command you used:

which is different to

you simply could boot into live ISO, open a terminal window and enter

sudo manjaro-chroot -a (enter 1 if only one line is offered)

and reinstall them all by

pacman -Syu cmake electron4 gnome-shell-extension-openweather go js60 lib32-libdbusmenu-gtk2 lib32-libidn lib32-libindicator-gtk2 linux-latest linux-latest-nvidia-440xx linux57-nvidia-440xx python-pytoml qt5-styleplugins qt5ct wxgtk2 xorg-font-utils xorg-fonts-alias
mkinitcpio -P
depmod -a
update-grub
exit

Afterwards, reboot :crossed_fingers:

P.S: personally I won’t reinstall all packages with latest in the name…

1 Like

They did do sudo pacman -Rns $(pacman -Qtdq)

So $(pacman -Qtdq) pulls all of the orphan package names, and outputs them for pacman -Rns

For their computer at the time of using that command,

$(pacman -Qtdq) = cmake electron4 gnome-shell-extension-openweather go js60 lib32-libdbusmenu-gtk2 lib32-libidn lib32-libindicator-gtk2 linux-latest linux-latest-nvidia-440xx linux57-nvidia-440xx python-pytoml qt5-styleplugins qt5ct wxgtk2 xorg-font-utils xorg-fonts-alias

It’s like order of operations in math, you do things in the parenthesis first to be able to continue with the rest of the equation.

3 Likes

I understand that it looks different, but I do not understand how this command shows up there, as I followed the instructions that I had posted earlier. Maybe the list of packages to be removed is the result of $(pacman -Qtdq)?

Anyway, I can try reinstalling them as you suggest. However, I do not totally understand what you mean with that line:

Let’s see if it is self-explanatory if I enter the command. Again, I’m copying commands without fully understanding what they do :see_no_evil:

I will let you know if it solved the problem.

1 Like

That’s fine, thanks for the hint - but it does not matter here. :laughing: From the log file you cannot derive this.

manjaro-chroot has a little bug: If there is only one system you could chroot in it asks you to select a system and it tells you something like enter 0 or 0 :rofl: and the right answer is 1 instead - that’s all. You will see it if you enter the command.

1 Like

Thanks for pointing that out. That was what I suspected. But I do not understand, how all these apparently essential packages were identified as orphans? Any explanation?

Try first to reinstall what is needed then we will have a closer look.

(base) [manjaro-gnome log]# sudo pacman -Syu cmake electron4 gnome-shell-extension-openweather go js60 lib32-libdbusmenu-gtk2 lib32-libidn lib32-libindicator-gtk2 linux-latest linux-latest-nvidia-440xx linux57-nvidia-440xx python-pytoml qt5-styleplugins qt5ct wxgtk2 xorg-font-utils xorg-fonts-alias
:: Synchronizing package databases…
core is up to date
extra is up to date
community is up to date
multilib is up to date
error: target not found: electron4
error: target not found: xorg-font-utils
error: target not found: xorg-fonts-alias

This is what I get as a response and it doesn’t seem right to me, nothing is installed and there are only the 3 errors.
Also in the log, it only shows

[2020-10-15T21:29:58+0200] [PACMAN] Running ‘pacman -Syu cmake electron4 gnome-shell-extension-openweather go js60 lib32-libdbusmenu-gtk2 lib32-libidn lib32-libindicator-gtk2 linux-latest linux-latest-nvidia-440
xx linux57-nvidia-440xx python-pytoml qt5-styleplugins qt5ct wxgtk2 xorg-font-utils xorg-fonts-alias’
[2020-10-15T21:29:58+0200] [PACMAN] synchronizing package lists

now.

Try to chroot again and run

    pacman-mirrors -f && pacman -Syyu

as first command Make sure you have internet connection.

Then exit chroot and report.

I did and it seemed it pinged different mirrors and at the end it said

::INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist
:: Synchronizing package databases…
core 168.6 KiB 4.12 MiB/s 00:00 [#############################################################################] 100%
extra 2010.2 KiB 11.1 MiB/s 00:00 [#############################################################################] 100%
community 6.2 MiB 12.8 MiB/s 00:00 [#############################################################################] 100%
multilib 191.8 KiB 11.0 MiB/s 00:00 [#############################################################################] 100%
:: Starting full system upgrade…
there is nothing to do