Fix "Error opening the cache, the Package list or status could not be parsed or opened."

Hello, I have this issue:

I know this would fix it:

But I got this error when I open my pc while there is no internet connection.
So I need a solution to not (try to) check the updates when there is no connection.

Thank you.

You could try it with apt list --upgradable but maybe simply connect to the Internet and try a sudo apt update && sudo apt upgrade and see what Output you get.

And when You want doing this:

You wouldn't need for the first 2 Commands a Internet Connection. That would only be neccessary for the last 2. So, You could use/try it.