You are not logged in.
Hi there!
I have installed Arch way back in 2010 sometime, and just migrated it via a bootable USB drive to new hardware as time progressed.
This has me thinking that maybe I have some really outdated or unused configuration files sitting around.
They won't show up in lostfiles, and may not be emitting error messages, but it is possible that they might be subtly make my system act weird.
Way back when I installed the first time, you needed to hand-tune the Xorg.conf file, for example.
I'm thinking of doing a fresh install of Arch on some bootable USB drive, then re-installing all the packages from the old install to get a copy of all the recent configs, rather than going through each package's config file by hand. Then, of course, once I am happy with the setup then just replace my current install with the new one.
What are the seasoned Arch users opinion on this?
Is there maybe a better way to get a clean root?
Last edited by evorster (2025-04-30 11:24:01)
Offline
You didn't care about your config files since 2010 and your system is still running? god DAMN.
This has me thinking that maybe I have some really outdated or unused configuration files sitting around.
See https://wiki.archlinux.org/title/Pacman … nd_Pacsave, that's pacman's way of telling you there's a newer default config (there's a nice pacman hook that checks if you didn't update them when you update).
Usually, you don't need to update your configs unless they break. If you want to keep them up to date (which might be usefull), get the new default file, and re-change it from scratch.
I don't think you need to reinstall, just check all the pacnew files (it'll be quite a lot after 15 years).
Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...
Offline
Hmm, it is a little more nuanced than that...
/etc contains about 16 pacnew files, so that's not so terrible. However, through the years, I have encountered many "interesting" issues, and have modified various files to work around them... Sometimes caused by hardware issues that have been replaced, or incompatible software or whatever... Point is, files have been created, or may have outdated options in them.
I'm just weighing up the pros and cons of just starting fresh or going through each configuration file trying to figure out whether all the options are standard, or something I added so long ago that I don't recall anymore..
Or just getting a fresh install and be done with it.
Just for reference:
[evert@Evert etc]$ pacman -Qqn | wc -l
2224
[evert@Evert etc]$ pacman -Qqm | wc -l
77
With that number of packages installed, I might have packages installed that I don't need anymore, and the install reason for some of those might be wrong, and that is the other reason that I am considering some spring cleaning.
Offline
Or just getting a fresh install and be done with it.
It all comes down to a personal preference:
I have a window manager, e.g. a lot of manually created config files. I won't ever rewrite those from scratch, that'd take me more than a week.
Also, I'm one of the people that actually flies over the downloaded packages in a update, and I sometimes delete some stuff I don't need anymore.
(I just generally hate reinstalling, it's such a time consuming process for me)
You might need to reconfig the files you changed (I mean, you say yourself you changed them for a reason)
Last edited by jl2 (2025-04-29 07:26:37)
Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...
Offline
For starters I'd try with something like sudo find /etc -atime +365 to find all files in /etc that weren't accessed in the last year (or whichever sensible cutoff point). Go over them, remove what you don't need, crosscheck with pkgfile (might find packages you no longer need that way, too). Chances are that if a file doesn't get accessed at all, it's cruft.
And/or set up etckeeper, commit everything you currently have, delete whatever you deem unneccessary - if something breaks, restore the file in question.
Last edited by Whoracle (2025-04-29 10:31:12)
Offline
Aren't you seasoned enough yourself? Keeping running Arch from 2010?
But seriously, I'm in the same boat, running a few Arch systems (only storage server [NAS?] on BSD/ZFS) since about the same time, 2010-2011. I never thought about reinstalling when changing hardware. It's the Windows(r) way.
I suggest doing a little maintenance if your system is running fine.
1. Deal with new configs, if you have not deleted any 'pacnew' files. Use one of the diff utilities (I personally use vimdiff, but if you prefer GUI, there are gvimdiff, kdiff3, etc). And you'll be surprised that most of the changes are comments or commented defaults. But it's better to check those anyway to avoid missing new features. New configs coming with Arch rarely break things, except for some upstream issues (I can recall postfix, samba, and maybe one or two more).
1.1. If you deleted some of the 'pacnew' files earlier, do this
sudo pacman -Qo /etc | awk '{print $5}' | uniq
to get the list of packages having something in /etc and reinstall them to get all the pacnews back.
1.2. Of course, make a backup first, or (personal advice), track /etc with git (or hg or something else). This way you can always see config changes and rollback if needed without unneeded pain.
2. Unused/unneeded packages. There is a very useful pkg-list_true_orphans script in https://aur.archlinux.org/packages/pkg_scripts. You may just uninstall all in bulk or examine each with 'pacman -Qi'. At least check the output, maybe there's something you're using, but was installed as a dep for a missing package. You may be required to do this 1-2 times more, depending on uninstalled packages' dependencies.
2.1. Check for unmaintained/orphan/missed AUR packages. Orphans usually mean they do not work/compile anymore. Missed ones can be renamed or even moved to extra repo (or the same as orphans). Most AUR helpers can show that (at least yay, paru).
1.3. Addition: 'pkg-list_unpackaged_files /etc' from the same pkg_scripts will help you to find obsolete/removed configs. You also may do it for the /usr, /var, /boot.
3. Cleanup. Mostly /var - logs and such. Sometimes old kernel modules aren't deleted, so check '/usr/lib/modules' and keep only those for kernels you're using.
That's basically all. Hope it helps.
Cheers!
Offline
Ah, I went ahead and re-installed both Windows 11 and Arch from scratch.
I needed to move around some underlying storage and sort through my data in any case.
With my particular setup the installer script failed, not realizing that I have my EFI partition on one volume and the OS on another. In either case, not too painful and a good brush up on some skills. I even took the opportunity to get a fresh KDE profile too.
So, now it is roughly 24 hours later...
I'm still installing software that I use, but right now I have roughly halved the packages installed in the system. It was simply the less painful way to get a fresh start.
Can you imagine sorting through 1000 packages to see whether it is still in use, what requires it and so on?
In any case, thank you for taking a look at this, I'll go ahead and mark it solved.
Thanks for the tip on pkg-list_true_orphans. I'll check
Going forward I'll be more conscientious when it comes to those pesky pacnew files.
Offline