You are not logged in.

#1 2009-03-10 14:47:39

arch0r
Member
From: From the Chron-o-John
Registered: 2008-05-13
Posts: 597

Keep the motor clean and running

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

#2 2009-03-10 15:00:54

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

Re: Keep the motor clean and running

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

#3 2009-03-10 15:12:15

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: Keep the motor clean and running

'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

Board footer

Powered by FluxBB