anvil/tools/clean-pip
Joshua Harlow e0ccae357f Move multipip and associated to tools + docs.
Use the readme.rst for multipip for other tools and
place multipip and the new tools under tools since they
are anvil tools and should be under that directory.

Adjust the code to look under that directory when finding
py2rpm and multipip.

Remove some tools which are no longer needed/used/make sense.

Change-Id: If3a0d627c42ef0374f764ad9e276424b43f29a66
2013-05-31 22:30:15 -07:00

15 lines
266 B
Bash
Executable File

#!/bin/bash
# this utility removes package installed by pip
# but not by rpm
tmp_dir=$(mktemp -d)
echo "Moving unowned files to $tmp_dir"
for f in /usr/lib*/python*/site-packages/*; do
if ! rpm -qf $f &>/dev/null; then
mv -v $f $tmp_dir/
fi
done