The correct command to remove a package is, e.g.
sudo apt-get --purge remove wine1.4
and NOT
sudo apt-cache --purge remove wine1.4
--purge
doesn't remove other packages, if the other packages don't depend on this package.
The command sudo apt-cache pkgnames wine
prints only known packages and not the installation status:
From man apt-cache
,
pkgnames [prefix]
This command prints the name of each package APT knows.
The optional argument is a prefix match to filter the name list. The
output is suitable for use in a shell tab complete function and
the output is generated extremely quickly. This command is best used with
the --generate option.
To show the installation status, you could use apt-cache policy
:
$ apt-cache policy wine
wine:
Installed: (none)
Candidate: 1:1.7.44-0ubuntu1
Version table:
1:1.7.44-0ubuntu1 0
500 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu/ wily/main amd64 Packages
1:1.6.2-0ubuntu10 0
500 http://archive.ubuntu.com/ubuntu/ wily/universe amd64 Packages
or dpkg -l
$ dpkg -l | grep wine
rc wine1.6 1:1.6.2-0ubuntu10 amd64 Microsoft Windows Compatibility Layer (Binary Emulator and Library)
rc wine1.6-amd64 1:1.6.2-0ubuntu10 amd64 Microsoft Windows Compatibility Layer (64-bit support)
rc wine1.6-i386:i386 1:1.6.2-0ubuntu10 i386 Microsoft Windows Compatibility Layer (32-bit support)
ii wine1.7 1:1.7.44-0ubuntu1 amd64 Microsoft Windows Compatibility Layer (Binary Emulator and Library)
ii wine1.7-amd64 1:1.7.44-0ubuntu1 amd64 Microsoft Windows Compatibility Layer (64-bit support)
ii wine1.7-i386:i386 1:1.7.44-0ubuntu1 i386 Microsoft Windows Compatibility Layer (32-bit support)
ii winetricks 0.0+20141009+svn1208-2ubuntu1 all Microsoft Windows Compatibility Layer (winetricks)
apt-get
is the command for installing and removing packages. Seeman apt-get
, and dosudo apt-get --purge remove wine1.7
– waltinator Dec 17 '15 at 07:36