Skip to content

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.

7 points14 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
7 · 100% up
Kind
Text
ID
5nvfaa

Author

7
posts
23
comments
0
media
View profile

14 comments

8 points

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?

0 points

as root: "pacman -R $(comm -23 <(pacman -Qq | sort) <((for i in $(pacman -Qqg 'base sudo'); do pactree -ul "$i"; done) | sort -u))"

1 points

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.

2 points

Could you detail this process a bit more? It sounds attractive, but also like it will remove many things I don't understand.

1 points

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.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.