You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the auto_installed flag is cleared and the user flag is set whenever a package is upgraded. This prevents upgraded dependent packages from being removed with --autoremove.
For example on a NanoPi R4S running 23.05.2:
Installing vim installs the dependencies terminfo and libncurses6.
root@OpenWrt:~# opkg install vim
Installing vim (9.0-1) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/aarch64_generic/packages/vim_9.0-1_aarch64_generic.ipk
Installing terminfo (6.4-2) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/aarch64_generic/base/terminfo_6.4-2_aarch64_generic.ipk
Installing libncurses6 (6.4-2) to root...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/aarch64_generic/base/libncurses6_6.4-2_aarch64_generic.ipk
Configuring terminfo.
Configuring libncurses6.
Configuring vim.
Initially vim has the user flag, while terminfo and libncurses6 correctly have only the auto_installed flag.
At this point running opkg remove --autoremove vim will successfully remove vim and its dependencies terminfo and libncurses6.
root@OpenWrt:~# opkg remove --autoremove vim
Removing package vim from root...
libncurses6 was autoinstalled and is now orphaned, removing.
Removing package libncurses6 from root...
terminfo was autoinstalled and is now orphaned, removing.
Removing package terminfo from root...
However if we upgrade terminfo first, we can see the user flag is added and the auto_installed flag is removed.
root@OpenWrt:~# opkg upgrade terminfo
Upgrading terminfo on root from 6.4-1 to 6.4-2...
Downloading https://downloads.openwrt.org/releases/23.05.2/packages/aarch64_generic/base/terminfo_6.4-2_aarch64_generic.ipk
Configuring terminfo.
root@OpenWrt:~# sed -n '/Package: terminfo/,/^$/p' /usr/lib/opkg/status
Package: terminfo
Version: 6.4-2
Depends: libc
Status: install user installed
Architecture: aarch64_generic
Installed-Time: 1705511717
Now if we run opkg remove --autoremove vim then vim and libncurses6 will be removed and its dependency terminfo will be left installed.
root@OpenWrt:~# opkg remove --autoremove vim
Removing package vim from root...
libncurses6 was autoinstalled and is now orphaned, removing.
Removing package libncurses6 from root...
The text was updated successfully, but these errors were encountered:
Currently the
auto_installed
flag is cleared and theuser
flag is set whenever a package is upgraded. This prevents upgraded dependent packages from being removed with--autoremove
.For example on a NanoPi R4S running 23.05.2:
vim
installs the dependenciesterminfo
andlibncurses6
.vim
has theuser
flag, whileterminfo
andlibncurses6
correctly have only theauto_installed
flag.opkg remove --autoremove vim
will successfully removevim
and its dependenciesterminfo
andlibncurses6
.terminfo
first, we can see theuser
flag is added and theauto_installed
flag is removed.opkg remove --autoremove vim
thenvim
andlibncurses6
will be removed and its dependencyterminfo
will be left installed.The text was updated successfully, but these errors were encountered: