Remove menu clutter after installing multiple distros
Q After installing various distros I have a cluttered /home/username folder and a menu full of unusable program entries. How can I delete these dead entries and sort the files into folders by extension, for example putting all GIF, PNG and JPEG files into one directory? I would also need to deal with duplicate files. This is in preparation for reinstalling Ubuntu.
A I would rename the /home/username folder before installation, then only copy over the files you need. This is probably easier than trying to clean out the detritus from a live home directory. The best program I have found for identifying and removing redundant files is Kleansweep, from http://linux.bydg.org/~yogin. Finding duplicate files is best done with Fdupes from http://netdial.caribe.net/~adrian2/fdupes.html. Use it like this:
fdupes --recurse ~ fdupes --recurse --omitfirst ~ | xargs rm
The first line will show all duplicate files, the second will remove all but the first occurrence of each file - use this with care. Sorting files by name is best done with the find command. You can move the files you mention with
mkdir pics
find ~ -iname '*.jpg' -o -iname '*.png' -o -iname
'*.gif' -exec mv "{}" pics ';'
Related solutions
- Remove old version of Apache before installing new one
- Why do distros handle USB memory stick scripts differently?
- Cannot boot into Windows XP after installing Linux
- Run 32-bit and 64-bit distros from the same drive
- Installing OpenOffice.org: circular RPM dependencies



Copyright 2012 Future Publishing Limited (company
registered number 2008885), a company registered
in England and Wales whose registered office is at
Beauford Court, 30 Monmouth Street, Bath, BA1 2BW, UK