You probably remember the few packages that you have manually installed by yourself. Those are the only ones that you should/could opkg upgrade blindly.
No. At least for self-built firmware images, also the packages installed at the image compilation stage are listed as "user installed" by "opkg status". (the same likely hold true for release builds, but I haven't used those for many years.)
But you can use the install time as a trick to identify the packages. All packages installed at the firmware creation time have the same installation time stamp. All packages installed by you manually (after flashing, in a live router) will have a later time stamp.
You can use "opkg status" and grep to get the relevant info.
Example: I have only installed "joe" later, and all other packages are in the image.
Using just "opkg status" would give a long list like the example below. It is hard to pick any differencies in the install time:
Package: wireless-regdb
Version: 2017-10-20-4343d359
Depends: libc
Status: install user installed
Architecture: arm_cortex-a15_neon-vfpv4
Installed-Time: 1550170221
Package: kmod-scsi-core
Version: 4.14.99-1
Depends: kernel (= 4.14.99-1-ab5b14eb9dbaf3e96fc13c6b47294149)
Status: install user installed
Architecture: arm_cortex-a15_neon-vfpv4
Installed-Time: 1550170221
Package: kmod-slhc
Version: 4.14.99-1
Depends: kernel (= 4.14.99-1-ab5b14eb9dbaf3e96fc13c6b47294149), kmod-lib-crc-ccitt
Status: install user installed
Architecture: arm_cortex-a15_neon-vfpv4
Installed-Time: 1550170221
But let's narrow the output. First do
opkg status | grep -E "Packa|Insta" | head
You will get output like:
Package: kmod-usb-storage
Installed-Time: 1550170221
Package: terminfo
Installed-Time: 1550170221
Package: luci-theme-material
Installed-Time: 1550170221
Package: iwinfo
Installed-Time: 1550170221
Package: luci-app-statistics
Installed-Time: 1550170221
So, 1550170221 is the common installation time, the firmware creation time. All packages installed at that time are in ROM image.
Let's utilise that to narrow the output further:
opkg status | grep -E "Packa|Insta" | grep -v "1550170221" | less
The only lines with "Installed-Time" left are those that you have installed, either directly or automatically as dependency. You can much easier find out the few installed packages (like "joe" for me).
Package: kmod-crypto-aead
Package: libiwinfo-lua
Package: joe
Installed-Time: 1550246712
Package: kmod-usb-dwc3
Package: swconfig
Package: kmod-crypto-md4
Package: kmod-crypto-md5
But in general, only use "opkg upgrade" to upgrade packages that you know that you have directly installed by yourself.
EDIT:
Still further narrowing the output by using grep with context:
opkg status | grep -E "Packa|Insta" | grep -E -v "Packa|1550170221" -C 1
This lists the packages installed by you and their installed time, plus one extra line after the Installed-Time line for each installed package:
Package: joe
Installed-Time: 1550246712
Package: kmod-usb-dwc3
Imaginative use of shell commands can do wonders