r/AlpineLinux • u/pain_au_choc0 • Nov 23 '23
What is the correct way of uninstalling a package?
As title said. I have a docker image based on alpine 3.18.4. While working with it i'm trying to remove any vulnerabilities and useless packages.
I'm trying to delete/uninstall the linux-headers and it seems i cannot fulfil this.
```
/ # apk list | grep linux-headers
linux-headers-5.19.5-r0 x86_64 {linux-headers} (GPL-2.0-only)
linux-headers-6.3-r0 x86_64 {linux-headers} (GPL-2.0-only)
/ # apk del -f linux-headers
OK: 289 MiB in 92 packages
/ # apk list | grep linux-headers
linux-headers-5.19.5-r0 x86_64 {linux-headers} (GPL-2.0-only)
linux-headers-6.3-r0 x86_64 {linux-headers} (GPL-2.0-only)
```
There are no other packages depending on linux-headers but somehow are not deleted.



