7

I've tried virtually everything I've found so far, like sudo apt remove anki, etc which basically returns package not found.

The closest I've come is running sudo apt-file list anki, which gives me a long list of the files, but when i navigate to that directory (/usr/bin/anki) it says it doesn't exist. Although the app is still on my desktop and still runs when i click it, navigating to my /applications folder shows no file anki.desktop.

Really frustrated, I'm just trying to remove anki from my computer..

Pablo Bianchi
  • 14,308
  • 4
  • 74
  • 117
Caleb McKay
  • 71
  • 1
  • 2
  • theres no package contents but whenever i type anki into the terminal it opens the application – Caleb McKay Jul 20 '20 at 07:51
  • try `which anki`, which should tell you exactly what binary or script is being run. I would then `ls -l /path/to/that/directory | grep anki`, which will tell you whether it's a symlink to something else or what have you. You'll probably find the .desktop file in /usr/share/applications. – Dan Scally Jul 20 '20 at 07:55
  • Thanks for the speedy response @DanScally, unfortunately I deleted the command "anki" by accident using `sudo rm -r usr/bin/anki` so using which anki results in no outputs.. and also couldn't find anki.desktop in usr/share/applications but my other linux desktops apps are there – Caleb McKay Jul 20 '20 at 08:28
  • well that's probably why you can't find the binary `apt-file list anki` points you to; are the other files it lists still there? – Dan Scally Jul 20 '20 at 08:33
  • @DanScally yeah files are still there.. The app is no longer on my desktop though and running anki doesnt launch it, but it still says usr/bin/anki exists along with like 80 other files when running `sudo apt-file list anki` – Caleb McKay Jul 20 '20 at 08:36
  • which has me so confused becuase i try to navigate to the directories displayed on that list it generate but it continually says no such file or directory – Caleb McKay Jul 20 '20 at 08:39
  • 1
    `apt-file list` doesn't list _installed_ files, it lists the files _in the package_. I.E. you can run it without ever having installed a package and it'll tell you what files it will create. You could try `dpkg -L anki` which does the same thing but only for installed files, and you can probably fix this whole thing with `sudo dpkg -P anki` which means "Purge all files related to the anki package" – Dan Scally Jul 20 '20 at 08:44
  • might just call it a night.. tried `sudo dpkg -P anki` and said 'ignoring request because not installed' tried -r too same thing. Not sure if there's a way to completely exterminate this from here but looks like whatever we did at least took the main application off. Thanks so much for your help @DanScally – Caleb McKay Jul 20 '20 at 09:18
  • no problem. If dpkg also insists it's not installed, probably all you can do is go through the list that `apt-file list anki` gives you and remove the files that are still present out of that list. – Dan Scally Jul 20 '20 at 09:23

6 Answers6

3

It depends on where your uninstall.sh is.

In my case:

cd /usr/local/share/anki/
sudo ./uninstall.sh

It's actually kombination of vero's and Mohab's solution. But it works for me.

刘启迪
  • 31
  • 2
1
  1. Navigate through the graphical interface to the HD, in the search bar type "anki".

  2. Open the anki folder.

  3. Right-click and select Open in Terminal.

  4. In the terminal run:

    sudo make uninstall
    

    You will get an output similar to this:

    root@debian-jean:/home/jean/anki-2.1.26-linux-amd64# sudo make uninstall anki 
    
    xdg-mime uninstall /usr/local/share/anki/anki.xml rm -rf
    /usr/local/share/anki rm -rf /usr/local/bin/anki rm -rf
    /usr/local/share/pixmaps/anki.xpm rm -rf
    /usr/local/share/pixmaps/anki.png rm -rf
    /usr/local/share/applications/anki.desktop rm -rf
    /usr/local/share/man/man1/anki.1
    Uninstall complete.
    
BeastOfCaerbannog
  • 12,964
  • 10
  • 49
  • 77
1
  • First, which anki, which should tell you exactly what binary or script is being run. Ex output: /usr/local/bin/anki
  • Then, go into this folder with cd /path/to/that/directory. In my case: cd /usr/local/bin/anki
  • Into this folder you would find the file uninstall.sh. Run this to uninstall Anki. In my case: sudo ./uninstall.sh
vero
  • 11
  • 1
1
  1. Try locating the uninstall.sh script for Anki in one of the following locations and execute it with sudo ./uninstall.sh (Do not forget the sudo part):

    • /usr/local/share/anki/
    • /usr/local/bin/anki

    Alternatively try locating the folder executing which anki

  2. If you can't find it, don't worry. Just download the latest version of Anki and decompress it somewhere. Double clicking on the downloaded file is usually enough to show you the Anki folder that you can then drag and drop where you prefer. You'll find the uninstall.sh script inside. Execute it as mentioned above with sudo ./uninstall.sh

Pedro
  • 111
  • 4
0

I had the same problem and this worked for me:

cd /usr/local/share/anki/
sudo make uninstall 
Mohab
  • 1
0
  1. Navigate to the location of your Anki folder in terminal.
  2. Run the uninstall.sh shell script located in the folder using sudo sh ./uninstall.sh