Search code examples
uninstallationns-3

How to uninstall ns3 from ubuntu when package can't be located?


I've downloaded ns3.36 via tarball on ubuntu 20.04.4. But then I confronted some errors while trying to configure it so I decided to uninstall and re-install it again. I used

sudo apt-get remove ns3

and also

sudo apt-get purge --auto-remove ns3

but I got an error:

 E: Unable to locate package ns3

I've tried doing the same on the different directories from where I've installed like ns-allinone-3.36 or ns-3.36 but I'd get the same error. I've also tried typing ns-3.36 instead of ns3 but still didn't work.

I also tried using dpkg but I got another error:

dpkg: warning: ignoring request to remove ns3 which isn't installed

How can I uninstall it?


Solution

  • You didn't install ns-3 on your computer via the tarball. You simply unpacked the tarball, so apt does not know about ns-3. To delete ns-3, just delete the ns-3 directory:

    rm -r ns-allinone-3.36/