You are not logged in.

#1 2009-06-21 01:11:16

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

reverting to a virgin system with pacman

I'd like to revert my system to a virgin state with pacman (i.e. a fresh install without nuking the root partition and installing via the CD).  Is there an easy way I can remove all the packages except for the system-base ones, alsa, etc or am I just better off nuking the partition and installing from the CD?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2009-06-21 01:22:05

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: reverting to a virgin system with pacman

Even if you removed all the non-base packages, you'd still have customized versions of base config files (like /etc/passwd and /etc/rc.conf) and there would be leftover files that don't come in any package. I'd just reinstall from the CD.

Offline

#3 2009-06-21 01:29:03

fflarex
Member
Registered: 2007-09-15
Posts: 466

Re: reverting to a virgin system with pacman

The following command will remove all packages that are not in base:

pacman -Rnu `pacman -Qq | cat - <(pacman -Qqg base) | sort | uniq -u`

Last edited by fflarex (2009-06-21 02:34:12)

Offline

#4 2009-06-21 02:24:07

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: reverting to a virgin system with pacman

Pacpal has an option to find files which don't belong to any installed package. For example, if you wanted to find all unpackaged files in /etc, you would run this command:

pacpal --list-unpkgd /etc

After removing all but the base packages, it should be useful in finding leftover files. As already mentioned, some system configuration files are not considered part of the package that creates them and you shouldn't remove them, so use it with caution.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#5 2009-06-21 02:45:47

venky80
Member
Registered: 2007-05-13
Posts: 1,002

Re: reverting to a virgin system with pacman

wow i have been looking for this type of tool  forever can you name some of the system config files?


Acer Aspire V5-573P Antergos KDE

Offline

#6 2009-06-21 10:07:03

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: reverting to a virgin system with pacman

Thanks for the replies, all.  Ended-up biting the bullet and doing the re-install.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB