Uninstalled IPython on Ubuntu but can still be used
Question: I tried to install rpy2 earlier today, to use IPython Notebooks in conjunction
with R. I'm using Ubuntu 12.04. However, I had issues with using the magics
extension, so went off down a rathole to resolve...

I've tried to uninstall IPython via the command

    
    
    sudo apt-get remove --auto-remove ipython
    

... which seemed to work correctly, and from looking in
`/usr/lib/python2.7/dist-packages`, I manually can't see an IPython directory.
I double checked the uninstallation method worked:

    
    
    me@my_laptop:/usr/lib/python2.7/dist-packages$ sudo apt-get remove -auto-remove ipython
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Package ipython is not installed, so not removed
    0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
    

However, I can go into a terminal and type `ipython` I get the following --
note that I can import the package as well:

    
    
    me@my_laptop:/usr/lib/python2.7/dist-packages$ pwd
    /usr/lib/python2.7/dist-packages
    me@my_laptop:/usr/lib/python2.7/dist-packages$ ipython
    Python 2.7.3 (default, Dec 18 2014, 19:10:20) 
    Type "copyright", "credits" or "license" for more information.
    
    IPython 3.0.0-b1 -- An enhanced Interactive Python.
    ?         -> Introduction and overview of IPython's features.
    %quickref -> Quick reference.
    help      -> Python's own help system.
    object?   -> Details about 'object', use 'object??' for extra details.
    
    In [1]: import IPython
    
    In [2]: IPython
    Out[2]: <module 'IPython' from '/usr/local/lib/python2.7/dist-packages/IPython/__init__.pyc'>
    

NB I tried to use the comment by kermit666 in, butthis did not seem to help:
[Broken IPython notebook install Ubuntu 13.10 how to force
reinstall](http://stackoverflow.com/questions/20454921/broken-ipython-
notebook-install-ubuntu-13-10-how-to-force-reinstall)

Does Python cache its packages somehow, like in a database, that I need to
update somehow? I don't understand how it is loading something that in theory
has been deleted?


Answer: you just check the package where it's located

    
    
    $ which ipython
    

May be u get the path `/usr/local/bin/` and then type the command.

    
    
    $ sudo rm -rf /usr/local/bin/ipython
    

It may be works.It's worked for me.

