To understand what apt-get purge ./python
tried to do, let's follow the manpage. First, the general syntax:
apt-get [-asqdyfmubV] [-o=config_string] [-c=config_file]
[-t=target_release] [-a=architecture] {update | upgrade |
dselect-upgrade | dist-upgrade |
install pkg [{=pkg_version_number | /target_release}]... |
remove pkg... | purge pkg... |
source pkg [{=pkg_version_number | /target_release}]... |
You'll see that apt-get
supports specifying a target release via /foo
. So, in ./python
, apt-get
interpreted python
as a target release. We'll get back to this in a moment.
Now, what about .
? apt-get
supports regular expressions, and if the package name contains .
, *
, etc., it will treat it as a regular expression. And apt-get
checks for partial matches - as long as the given expression matches a part of a package name, that package is selected:
If no package matches the given expression and the expression
contains one of '.', '?' or '*' then it is assumed to be a POSIX
regular expression, and it is applied to all package names in the
database. Any matches are then installed (or removed). Note that
matching is done by substring so 'lo.*' matches 'how-lo' and
'lowest'. If this is undesired, anchor the regular expression with
a '^' or '$' character, or create a more specific regular
expression.
.
matches every character - so every package name will satisfy it. Therefore, apt-get
will select every package it knows of.
Now, back to the target release, it is used for specifying which repository you want to target for this operation, if the same package is provided by multiple repositories. See How to only install updates from a specific repository?
python
is not a valid release on default Ubuntu (and unlikely to be one anyway). So, even though apt-get
picked every package it knew of, it couldn't find a matching release, and therefore, failed.
apt
, you should install it in a different location!