Remove package that were installed as dependancies by apk

Viewed 81

I'm looking for an equivalent to apt autoremove

I've seen stated everywhere online that it's not required because apk does it automatically when doing apk del. But it's very easy to verify that it doesn't actually does that:

docker run --entrypoint "/bin/sh" -it python:3.9-alpine
# apk add gcc
.......
OK: 117 MiB in 46 packages

# apk del gcc
....
OK: 14 MiB in 36 packages

You can also run apk list before and after to convince yourself of all the packages that were not removed

as you can see there are 113 MB worth of packages that were not removed (apk list shows hundreds of packages here), I really want to get rid of everything that was installed.

How can I do that ? Is that a bug, should everything be removed ? What can I do ?

0 Answers
Related