I noticed that I was unable to uninstall python packages via pip (0.7.2-1) on a Debian Squeeze instance:
root@diamondbuilder:~# pip freeze | grep swift
root@diamondbuilder:~# pip install swift
Downloading/unpacking swift
Downloading swift-1.4.8.tar.gz (421Kb): 421Kb downloaded
Running setup.py egg_info for package swift
Installing collected packages: swift
Running setup.py install for swift
changing mode of build/scripts-2.6/swift from 644 to 755
changing mode of build/scripts-2.6/swift-account-audit from 644 to 755
changing mode of build/scripts-2.6/swift-account-auditor from 644 to 755
changing mode of build/scripts-2.6/swift-account-reaper from 644 to 755
changing mode of build/scripts-2.6/swift-account-replicator from 644 to 755
changing mode of build/scripts-2.6/swift-account-server from 644 to 755
changing mode of build/scripts-2.6/swift-bench from 644 to 755
changing mode of build/scripts-2.6/swift-container-auditor from 644 to 755
changing mode of build/scripts-2.6/swift-container-replicator from 644 to 755
changing mode of build/scripts-2.6/swift-container-server from 644 to 755
changing mode of build/scripts-2.6/swift-container-sync from 644 to 755
changing mode of build/scripts-2.6/swift-container-updater from 644 to 755
changing mode of build/scripts-2.6/swift-dispersion-populate from 644 to 755
changing mode of build/scripts-2.6/swift-dispersion-report from 644 to 755
changing mode of build/scripts-2.6/swift-drive-audit from 644 to 755
changing mode of build/scripts-2.6/swift-form-signature from 644 to 755
changing mode of build/scripts-2.6/swift-get-nodes from 644 to 755
changing mode of build/scripts-2.6/swift-init from 644 to 755
changing mode of build/scripts-2.6/swift-object-auditor from 644 to 755
changing mode of build/scripts-2.6/swift-object-expirer from 644 to 755
changing mode of build/scripts-2.6/swift-object-info from 644 to 755
changing mode of build/scripts-2.6/swift-object-replicator from 644 to 755
changing mode of build/scripts-2.6/swift-object-server from 644 to 755
changing mode of build/scripts-2.6/swift-object-updater from 644 to 755
changing mode of build/scripts-2.6/swift-oldies from 644 to 755
changing mode of build/scripts-2.6/swift-orphans from 644 to 755
changing mode of build/scripts-2.6/swift-proxy-server from 644 to 755
changing mode of build/scripts-2.6/swift-recon from 644 to 755
changing mode of build/scripts-2.6/swift-recon-cron from 644 to 755
changing mode of build/scripts-2.6/swift-ring-builder from 644 to 755
changing mode of build/scripts-2.6/swift-temp-url from 644 to 755
changing mode of /usr/local/bin/swift-account-audit to 755
changing mode of /usr/local/bin/swift-object-expirer to 755
changing mode of /usr/local/bin/swift-proxy-server to 755
changing mode of /usr/local/bin/swift-container-replicator to 755
changing mode of /usr/local/bin/swift-container-sync to 755
changing mode of /usr/local/bin/swift-orphans to 755
changing mode of /usr/local/bin/swift-get-nodes to 755
changing mode of /usr/local/bin/swift-drive-audit to 755
changing mode of /usr/local/bin/swift-dispersion-populate to 755
changing mode of /usr/local/bin/swift-account-reaper to 755
changing mode of /usr/local/bin/swift-object-replicator to 755
changing mode of /usr/local/bin/swift-init to 755
changing mode of /usr/local/bin/swift-dispersion-report to 755
changing mode of /usr/local/bin/swift-oldies to 755
changing mode of /usr/local/bin/swift-ring-builder to 755
changing mode of /usr/local/bin/swift-form-signature to 755
changing mode of /usr/local/bin/swift-container-server to 755
changing mode of /usr/local/bin/swift-container-updater to 755
changing mode of /usr/local/bin/swift-bench to 755
changing mode of /usr/local/bin/swift-object-info to 755
changing mode of /usr/local/bin/swift-recon to 755
changing mode of /usr/local/bin/swift to 755
changing mode of /usr/local/bin/swift-object-server to 755
changing mode of /usr/local/bin/swift-object-updater to 755
changing mode of /usr/local/bin/swift-container-auditor to 755
changing mode of /usr/local/bin/swift-account-auditor to 755
changing mode of /usr/local/bin/swift-account-server to 755
changing mode of /usr/local/bin/swift-recon-cron to 755
changing mode of /usr/local/bin/swift-object-auditor to 755
changing mode of /usr/local/bin/swift-account-replicator to 755
changing mode of /usr/local/bin/swift-temp-url to 755
Successfully installed swift
Cleaning up...
root@diamondbuilder:~# pip freeze | grep swift
swift==1.4.8
root@diamondbuilder:~# pip uninstall swift
Uninstalling swift:
Proceed (y/n)? y
Successfully uninstalled swift
root@diamondbuilder:~# pip freeze | grep swift
swift==1.4.8
root@diamondbuilder:~#Fortunately, I found this and this, which indicates the issue lies w/ Debian’s python-setuptools (0.6.14-4). Anyway, using that info, I did:
root@diamondbuilder:~# cd /usr/local/lib/python2.6/dist-packages root@diamondbuilder:/usr/local/lib/python2.6/dist-packages# mv swift-1.4.8.egg-info/ swift-1.4.8-py2.6.egg-info/ root@diamondbuilder:/usr/local/lib/python2.6/dist-packages# cd - /root root@diamondbuilder:~# pip uninstall swift Uninstalling swift: /usr/local/bin/swift /usr/local/bin/swift-account-audit /usr/local/bin/swift-account-auditor /usr/local/bin/swift-account-reaper /usr/local/bin/swift-account-replicator /usr/local/bin/swift-account-server /usr/local/bin/swift-bench /usr/local/bin/swift-container-auditor /usr/local/bin/swift-container-replicator /usr/local/bin/swift-container-server /usr/local/bin/swift-container-sync /usr/local/bin/swift-container-updater /usr/local/bin/swift-dispersion-populate /usr/local/bin/swift-dispersion-report /usr/local/bin/swift-drive-audit /usr/local/bin/swift-form-signature /usr/local/bin/swift-get-nodes /usr/local/bin/swift-init /usr/local/bin/swift-object-auditor /usr/local/bin/swift-object-expirer /usr/local/bin/swift-object-info /usr/local/bin/swift-object-replicator /usr/local/bin/swift-object-server /usr/local/bin/swift-object-updater /usr/local/bin/swift-oldies /usr/local/bin/swift-orphans /usr/local/bin/swift-proxy-server /usr/local/bin/swift-recon /usr/local/bin/swift-recon-cron /usr/local/bin/swift-ring-builder /usr/local/bin/swift-temp-url /usr/local/lib/python2.6/dist-packages/swift /usr/local/lib/python2.6/dist-packages/swift-1.4.8-py2.6.egg-info /usr/local/lib/python2.6/dist-packages/test Proceed (y/n)? y Successfully uninstalled swift root@diamondbuilder:~# pip freeze | grep swift root@diamondbuilder:~#
I suppose I could have just cycled through /usr/local/lib/python2.6/dist-packages/swift-1.4.8.egg-info/installed-files.txt, removing files based off that, but I’m not familiar enough w/ python / pip to know if anything further would have been required.