You are not logged in.
hi all :>
my arch installations last quite a long time now and i don't really want to reinstall my computers even there are some unowned/leftover files on them. So here's my question:
how do arch users keep their system clean? searching and removing files by scripts, reinstalling all packages ... !?
best regards
arch0r :>
Offline
There's a tool in archlinuxfr to sort packages by amount used, but I've never tried. Another tip is to use tupac to find all files in /etc/ and /usr/, at least. not owned by packages.
The obvious one would be using 'pacman -Rs $(pacman -Qtdq)' to remove unneeded dependencies. I have this aliased to 'pacmanro' and run it regularly to make sure I haven't accidentally left stuff over.
Using 'LANG=C pacman -Qi | sed -n '/^Name[^:]*: \(.*\)/{s//\1 /;x};/^Installed[^:]*: \(.*\)/{s//\1/;H;x;s/\n//;p}' | sort -nk2' (from Wiki, obviously) to sort packages based on size can help for freeing up some space.
Also pay attention to the messages when you remove packages; watch for notices that config files were left behind. You could search the filesystem for '*.pacsave' files. There's probably a utility to help somewhere.
Offline
'updatedb && locate *pacorig *pacsave *pacnew' does the job for me.
#!/bin/bash
( echo "PACKAGE SIZE(K)";
for A in /var/lib/pacman/local/*/desc; do
egrep -A1 '%(NAME|SIZE)' $A \
| gawk '/^[a-z]/ { printf "%s ", $1 }; /^[0-9]/ { printf "%.0f\n", $1/1024 }'
done | sort -nrk2 ) | column -t
And that's my sort-by-size script.
1000
Offline