Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How do I uninstall a package from terminal?

Days ago, I installed Wine 6.0.2 (to run windows software) and Winetricks ‘20210206-next’ to be able to easily use Wine.
However, I uninstalled wine recently using sudo apt-get remove --auto-remove winehq-stable . I got this command from internet.

Now when I type wine in terminal I get bash: /usr/bin/wine: No such file or directory as it should be.
However, when I type apt list -a wine I get wine/focal,focal 5.0-3ubuntu1 all. Does it mean I still have Wine installed?
Also, I wanted to uninstall Winetricks. I used sudo apt-get purge winetricks then it says Package 'winetricks' is not installed, so not removed.

Please let me know how do I uninstall Winetricks. Btw when I type apt list -a winetricks I get winetricks/focal,focal 0.0+20200412-1 all. Also, I can’t see winetricks in my Ubuntu GUI package manager.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I ran apt list --installed| grep wine*, I can’t see any package named Wine or Winetricks. However, when I run winetricks or winetricks --version I can see the package is there.

Well, I am using Ubuntu 20.04.
Here is the output to dpkg -l | grep -i wine

rc  wine-stable                                6.0.2~focal-1                         amd64        WINE Is Not An Emulator - runs MS Windows programs
rc  wine-stable-amd64                          6.0.2~focal-1                         amd64        WINE Is Not An Emulator - runs MS Windows programs
rc  wine-stable-i386:i386                      6.0.2~focal-1                         i386         WINE Is Not An Emulator - runs MS Windows programs

>Solution :

apt list -a wine or apt list --all-versions wine lists all available versions of wine. I do not have wine installed, and the results of apt list -a wine in my terminal are the same as yours:

Listing... Done
wine/focal,focal 5.0-3ubuntu1 all

Run apt policy package to check if a package is installed. The results of apt policy wine confirm that the wine package is not installed:

wine:
  Installed: (none)
  Candidate: 5.0-3ubuntu1

Partial results of man apt showing the results for the list option of apt:

list
    list is somewhat similar to dpkg-query --list in that it can
    display a list of packages satisfying certain criteria. It supports
    glob(7) patterns for matching package names as well as options to
    list installed (--installed), upgradeable (--upgradeable) or all
    available (--all-versions) versions.

The results of apt list --installed wine or apt list -i wine don’t return any packages at all confirming that the wine package is not installed:

Listing... Done

When you run winetricks or winetricks --version you can see the package is there, because you did not install winetricks from the default Ubuntu 20.04 repositories. iinm you manually installed winetricks version 20210206-next with the following commands and did not manually remove winetricks from the /usr/local/bin directory where it is installed:

wget  https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x winetricks 
sudo mv -v winetricks /usr/local/bin

After manually removing winetricks from /usr/local/bin with cd /usr/local/bin && sudo rm winetricks run apt policy winetricks to check if it is still installed.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading