Pacman package removals

Hi, while figuring out why my wifi stopped working, i discovered that some important packages got removed. As i am not super confident linux user i would greatly appreciate your input on what might be the cause and how to avoid this in the future.

I recall removing orphans in pamac gui, removing ~/.cache folder lately and using rmlint, but i don’t see how it could be the cause of these packages removal.

These are the lines in /var/log/pacman.log where i believe happened the most:

[2020-12-07T16:55:16+0100] [ALPM] transaction started
[2020-12-07T16:55:16+0100] [ALPM] installed python-pytools (2020.4.3-1)
[2020-12-07T16:55:16+0100] [ALPM] installed pycuda-headers (2020.1-1)
[2020-12-07T16:55:16+0100] [ALPM] installed python-pycuda (2020.1-1)
[2020-12-07T16:55:20+0100] [ALPM] installed python-tensorflow-cuda (2.3.1-4)
[2020-12-07T16:55:20+0100] [ALPM] transaction completed
[2020-12-07T16:55:20+0100] [ALPM] running '30-systemd-update.hook'...
[2020-12-07T18:35:02+0100] [ALPM] running 'texinfo-remove.hook'...
[2020-12-07T18:35:02+0100] [ALPM] transaction started
[2020-12-07T18:35:02+0100] [ALPM] removed bison (3.7.2-1)
[2020-12-07T18:35:02+0100] [ALPM] removed autoconf (2.69-7)
[2020-12-07T18:35:02+0100] [ALPM] removed patch (2.7.6-8)
[2020-12-07T18:35:02+0100] [ALPM] removed gnu-netcat (0.7.1-8)
[2020-12-07T18:35:02+0100] [ALPM] removed automake (1.16.2-3)
[2020-12-07T18:35:02+0100] [ALPM] removed flex (2.6.4-3)
[2020-12-07T18:35:02+0100] [ALPM] removed fakeroot (1.25.3-1)
[2020-12-07T18:35:02+0100] [ALPM] removed make (4.3-3)
[2020-12-07T18:35:02+0100] [ALPM] removed python2-wxpython3 (3.0.2.0-3)
[2020-12-07T18:35:02+0100] [ALPM] removed pkgconf (1.7.3-1)
[2020-12-07T18:35:02+0100] [ALPM] removed kded (5.76.0-1)
[2020-12-07T18:35:02+0100] [ALPM] removed jq (1.6-4)
[2020-12-07T18:35:03+0100] [ALPM] transaction completed
[2020-12-07T18:35:03+0100] [ALPM] running '30-systemd-update.hook'...
[2020-12-07T18:35:03+0100] [ALPM] running 'update-desktop-database.hook'...
[2020-12-07T18:35:12+0100] [ALPM] running 'texinfo-remove.hook'...
[2020-12-07T18:35:12+0100] [ALPM] transaction started
[2020-12-07T18:35:12+0100] [ALPM] removed m4 (1.4.18-3)
[2020-12-07T18:35:12+0100] [ALPM] removed oniguruma (6.9.6-1)
[2020-12-07T18:35:12+0100] [ALPM] removed wxgtk3 (3.0.5.1-1)
[2020-12-07T18:35:12+0100] [ALPM] transaction completed
[2020-12-07T18:35:12+0100] [ALPM] running '30-systemd-update.hook'...
[2020-12-07T18:35:18+0100] [ALPM] transaction started
[2020-12-07T18:35:18+0100] [ALPM] removed wxgtk-common (3.0.5.1-1)
[2020-12-07T18:35:18+0100] [ALPM] transaction completed
[2020-12-07T18:35:18+0100] [ALPM] running '30-systemd-update.hook'...

Removing orphans is always a risky action. Pacman doesn’t handle it well, so you should NEVER trust in orphans list. Check it for yourself, take your time.

I’m trying to remove one orphaned package at a time and see if there are any other packages that go with it. If there are more, I do some research. Or actually, I try to figure out the packages that are on the list but it’s not always clear what is important and what not.

1 Like

I agree with @michaldybczak but would add that removing orphans using pamac is even more risky than pacman as the deinstallation of dependend packages is handled differently between pamac and pacman, so if you are going to see what orphans you have you can use

pacman -Qdt

Then, analyse the result and only if you are 100% sure all packages can be omitted remove them via

sudo pacman -Rn $(pacman -Qqdt) 

It could required to do this more than once as the removal could generate new orphans. If you are getting more experienced you could use

sudo pacman -Rsn $(pacman -Qqdt)

to not only remove orphans but also dependend packages not being dependencies for other packages.

More details:
https://wiki.archlinux.org/index.php/Pacman/Tips_and_tricks

3 Likes

Nope. That’s not it. Most of those on your truncated list are from the base-devel group.

If you don’t already have it, install pacutils. then inspect the output of:

paclog --after=2020-12-05 | paclog --before=2020-12-08

Note: If you are sure that you did your so-called ‘orphan’ removal on 7 Dec, you can probably adjust the “after” date in the above command to the day before (ie: 2020-12-06)

2 Likes