Clean way to reset Arch?
I've been using arch for a while and I really like it, but I've filled it with too many packages. Is there a clean way to remove every package that I compiled using pacman post install? I would like to keep the data in my home directory. I don't mind reconfiguring anything as long as my arch is as clean as the day I got it.
Edit: spelling
Edited 14 Jan 2017. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 7 · 100% up
- Kind
- Text
- ID
- 5nvfaa
14 comments
https://wiki.archlinux.org/index.php/Pacman/Tips_and_tricks#Removing_everything_but_base_group
This looks good. I was looking over what I'd miss and this looks like this would remove sudo. A question I've always had about packages is if you pacman -Rs a package, and later reinstall it, will it pick up where it left off? For example, will I have to reconfigure my sudoers list after reinstalling the base-devel group?
as root: "pacman -R $(comm -23 <(pacman -Qq | sort) <((for i in $(pacman -Qqg 'base sudo'); do pactree -ul "$i"; done) | sort -u))"
I did this recently, i didnt want to reset my disk setup or touch my home but the system stuff was kind of out of wack and i just wanted to wipe it and reinstall everything.
You can do what the other commenter said, just uninstall everything. This didnt really satisfy me though, so i booted up the arch install iso, mounted my root partition and the boot partition, just not the home so it wouldnt get touched and literally
rm -red it. Then i ran pacstrap and went from there.Could you detail this process a bit more? It sounds attractive, but also like it will remove many things I don't understand.
Its nothing complicated. It just completely wipes the system disk. This in some cases better then just uninstalling everything because that doesn't completely clear everything.
For example, if you messed up some configs in /etc that might not get fixed. If you messed up stuff in /usr/lib/ that might not get fixed either. Caches and things in /var for example, maybe a very large journalctl file or pacman cache, will not be cleared.
So you just clear the entire root partition and reinstall. If you follow the install guide in the wiki this is essentially starting from the pacstrap step.
As long as you don't mount the home partition or exclude it in your rm command then youl be fine.