Opkg doesn't recognize that it installed a package

I got overzealous and installed the nmap-full package, which takes up most of my space on the device (TP-Link Archer A7). Unfortunately, opkg remove nmap-full simply says "No pagages removed." Likewise, opkg list-installed | grep nmap shows nothing. Yet, the files are there:

/overlay/upper/usr/lib/opkg/info/nmap-full.prerm
/overlay/upper/usr/lib/opkg/info/nmap-full.control
/overlay/upper/usr/lib/opkg/info/nmap-full.postinst
/overlay/upper/usr/bin/nmap
/usr/bin/nmap
/usr/lib/opkg/info/nmap-full.prerm
/usr/lib/opkg/info/nmap-full.control
/usr/lib/opkg/info/nmap-full.postinst

The router was abruptly turned off by accident at some point after installing nmap-full. My guess is that somehow the changes to the list of installed packages did not persist when that happened.

But now I'm in a situation where I can't remove the package to free up the space (so I can't reinstall the package to delete it). Nor can I remove the files (I am warned that the filesystem is read-only, even though I am root!). What are my options here? I spent a lot of time setting up the network, and now I only have 140k free on the device. I'd rather not have to redo the whole setup

Chances are that your router ran out of space while installing dependencies, and never actually installed nmap-full l, this why it didn’t report it as installed.

You could uninstall the dependencies manually, instead. However, the fastest solution may be to simply make a backup, reset your router to defaults, then restore the backup. (The backup usually only contains config files unless you have set it to backup other items)

2 Likes

Thanks for the help. That did the trick, and I didn't have to do any manual configuration other than reinstalling adblock. :+1: :+1: :+1:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.