-
Notifications
You must be signed in to change notification settings - Fork 2k
Tell apt-get to actually autoremove everything it should #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tell apt-get to actually autoremove everything it should #71
Conversation
By default, apt-get autoremove won't remove packages that are recommended or suggested by *any* installed packages, not just the packages that auto-installed them.
Before:
After:
|
I really like this a lot, and it explains some odd behavior. What I don't get is why these default to such seemingly non-intuitive values upstream. 😕 I guess they're trying to err on the side of "don't remove too much" ? |
Yeah, I was really puzzled why installing and removing I've got a really rough tool at md5/docker-find that I've been using to track down what's inside the layers of an image or container. |
I just always assume that they are not as good as Portage. 😉 🔥🎣 This looks good to me but the |
I dropped the |
LGTM |
I know @paultag will lololol when he sees Regardless, it's 100% totally legit in this case, so LGTM. |
Tell apt-get to actually autoremove everything it should
Yeah, seems saneish; might let some folks shoot themselves in the foot at some point, but I think when you think about this in terms of it existing in a container -- how bad could it get :) Plus, it'd never really hit runtime, just image build time, so it'd only fail if you didn't test it :) 👍 |
Cool, thanks @paultag. ❤️ I'll work up a PR to the |
- `django`: 1.7.5, Python 3.4.3 - `ghost`: 0.5.9 - `golang`: change `/go` to be `777` (docker-library/golang#44) - `java`: 7u75-2.5.4-2 - `mariadb`: 10.1.3, 10.0.17 - `mongo`: 3.0.0 - `php`: more aggressive autoremove (docker-library/php#71) - `postgres`: `POSTGRES_DB` (docker-library/postgres#49) - `python`: 3.4.3, `--enable-unicode=ucs4` (docker-library/python#38) - `rails`: Ruby 2.2.1 - `ruby`: 2.2.1, 2.0.0-p643
I just discovered today that
autoremove
doesn't remove packages that are required or suggested by any installed package, even if the package that auto-installed them gets removed.I ended up adding
-o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false
in nginx-proxy/docker-gen#66 to getapt-get
to remove additional packages that it wasn't removing otherwise.I'm sure there are other images where this change would make sense, but I thought I'd start with
php
.