I wanted to remove orphans but instead of pacman I mistakenly typed yay
yay -Qdtq | yay -Rns -
Now most of the packages got removed.
Is it possible to get them back? If not I’m willing to reinstall few of them like filemanager, browser for now. But it says
config file /etc/pacman.d/endeavouros-mirrorlist could not be read: No such file or directory
It’s all my fault. Is it possible to fix this issue?
You can’t do nothing about this now but for FUTURE reference yay -Qdtq | yay -Rns - is too extreme.
A wise man here at the Forum taught me this: yay -Qdtq (let the list populate).
then yay -R packagename1 packagename2 or yay -RN package1 package2 it does not matter. manually remove them.
DO NOT go full -Rns.
The shi**y thing is when you remove the Qtdq package list more will show up after you delete the first 10 or more… It’s probably deps and indirects and debris.
Anyways it may take 10-15 minutes, the Endeavour swami taught me, but it’s gentle and nothing gets borked.
in my usage case Swami has not steered me wrong I don’t break stuff while housekeeping.
Uncle Ben giving Peter Parker some sage advice about Linux root level access
Don’t feel bad @shuvashish76, even Peter Parker got it wrong a few times.
I once accidentally did something similar, trashing my /usr/bin folder, with a mis-typed command. Without making a move, I quickly grabbed a copy of the same folder off another EndeavourOS system and jammed it in there. It was messy… it produced some conflicts and stray file errors for a bit, but was a successful fix for the most part.
Can’t I fix that endeavouros mirroslist error then install KDE plasma desktop environment from Live ISO?
Backup-files and re-install is the only option?
I think it’s a matter of understanding what was done.
From the live environment, you might access the log files for pacman. I don’t believe there is one for yay, but hopefully the actions are recorded in the pacman log.
It’ll be under (adjust this with respect to where you mount your normal Endeavour partition):
somemountpoint/var/log/pacman.log
If you can figure out precisely what was removed… well maybe via arch-chroot you could reinstall those?
Sometimes* I feel like I should move back to linux-mint though I understand it can happen to any distro. It’s purely my fault though.
Maybe NixOS or Btrfs has better safty for such situations‽
Whether you think Mint is a better fit for you is your call. But I would offer that everyone makes mistakes from time to time, and this is one you’re unlikely to make again
You can mount your original system, from within the Live ISO. It’s hopefully listed there in Dolphin (file manager) and you can click on it and explore.
Then it’s a matter of copying and pasting your /home/someusername folder to your backup.
Thanks that solved my issue
Back to system and installed few of the applications that I remember/use daily. From the log, I can see the which packages were removed previously but it’s too long.
Is it possible to search “removed” keyword from the lines and add only package names in paragraph with space between the words something like this I think it’s possible with grep command, never tried it myself.
I’m not sure you’re quite out of the woods yet. I want to note that what’s not necessarily clear from this list, is which packages are, and aren’t dependencies.
For example, if you look at libreoffice-fresh’s list of dependencies, it’s exhaustive. If installing libreoffice, you don’t need to explicitly install those, it will automatically install those as dependencies. If you uninstall libreoffice and those dependencies aren’t used by anything else, they can be cleanly removed quite easily (yay -Yc), because they are registered as dependencies.
Manually installing packages that are dependencies, but not specifying them as such (yay -S somepackage --asdeps) will lead to a lot of junk hanging around later on, and likely package conflicts.
When installing EndeavourOS you can choose to use GRUB instead of sytemd-boot. When selecting partitions, you can choose whole disk and select BTRFS and there are checkbox for encrypting the drive.
After booting into new system update packages and install Timeshift and grub-btrfs. Open Timeshift and go to settings and enable automatic snapshots on when you want it. Also enable grub-btrfs. Also it’s possible to add hook so Timeshift snapshots are made automatically before updating packages and after that.
Configure GRUB to not show up, unless you hold SHIFT while booting. Then you will be able to boot into specific snapshot.
I’m currently on the phone. You will have to duckduckgo further on that.