> I discovered a possible bug in the apt-get remove command, it actually
> broke my whole system, and removed all my packages.
Well, you pretty much asked it to, so that is not a bug.
status invalid
>
> I was trying to remove Wine 1.3 devel from my machine. This package
> contains several other packages such as winetricks. So instead of
> removing them one-by-one, I ran the following command:
>
> sudo apt-get remove win*
>
> I double checked before this, by hitting the TAB twice after typing
> "win".
Bash-completion is not a proper verification of the actions that
apt-get will take. Either use ‘apt-get --simulate …’, or read the
summary that apt presents before asking whether to proceed.
> There was supposed to be only 3 packages here.
Maybe in your mind, but not apts. Quoting the manual:
> 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.
Here ‘win*’ is a regular expression matching anywhere in the package
name. Any package whose name contains ‘wi’, which is perhaps quite a
few packages. Removing any non-trivial amount of packages generally
requires also removing many more, due to broken dependencies.
Apt is a system administration tool. Do not submit commands to it
without understand what those commands instruct.
> But after
> submitting the command, it actually started removing packages like:
> gtk+, gwibber, then the kernels, evolution etc. At this time it was
> too late to cancel the procedure.
Was there no summary of the actions followed by a prompt asking wheter
to proceed?
> The "win*" expression should cover only those packages those name is
> starting with win. Instead it considered * to be for every package.
>
As explained above. You have this very wrong. The expression you are
looking for in this case is “^win.*”.
Solution for this “bug” is to read the manual and disable options such
as Apt::Get::Assume-Yes, and Apt::Get::Force-Yes.
** Changed in: apt (Ubuntu)
Status: New => Invalid
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/848668
Title:
apt-get remove breaks system when removing Wine
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/848668/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs