I removed opera browser using the commands
sudo dpkg -r opera-stable
sudo rm -f /etc/apt/sources.list.d/opera-stable.list
While upgrading the error I now get is:
E: Problem executing scripts DPkg::Pre-Invoke 'stat -c %Z $(readlink -f $(which opera)) > /tmp/opera.timestamp'
E: Sub-process returned an error code
I tried cleaning apt, updating, upgrading with -y and all other ways that people advise.
I am on Lubuntu 20.04.
I removed all repositories in Software Sources but the problem hasn't gone.
apt purge opera-stable
gives:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
chromium-codecs-ffmpeg-extra pepperflashplugin-nonfree
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
opera-stable*
0 upgraded, 0 newly installed, 1 to remove and 42 not upgraded.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
readlink: missing operand
Try 'readlink --help' for more information.
stat: missing operand
Try 'stat --help' for more information.
E: Problem executing scripts DPkg::Pre-Invoke 'stat -c %Z $(readlink -f $(which opera)) > /tmp/opera.timestamp'
E: Sub-process returned an error code