I have new Raspberry Pi 4. I am accessing it through SSH, Ethernet cable to my laptop and VNC viewer to see the screen as I do not have a spare screen.

Whenever I try to update the Raspberry Pi, it suddenly gets disconnected. When I saw the LAN cable connection on laptop, it showed that whenever I entered the command to update it, the LAN port on Raspberry Pi would turn off and soon turn on resulting in new IP address. So I have to again connect it to putty and VNC viewer. It's very frustrating.

Currently I am using a 5V 3A mobile charger to power the Raspberry Pi as I saw that people were suggesting that maybe the board would not get enough power to support components on it.

In putty when I login it shows Wi-Fi blocked by rfkill.

The model I am using is Raspberry Pi Model B Rev 1.4

UPDATE 1- I tried one method mentioned in answer (to install screen first, then update), No results yet. The LAN port still switched off.

UPDATE 2- I bought official charger of Raspberry Pi and tried to power it. Still faced the same issue.

UPDATE 3 - I thought to see if there was any undervoltage due to power supply and ran the code vcgencmd get_throttled. I got throttled=0x0. On searching, I found that there was no undervoltage.

  • when you say update - what commands are you using and what operating system?
    – user115418
    Dec 14, 2020 at 15:09
  • The command I am using is sudo apt-get update.
    – mANmAN01
    Dec 14, 2020 at 16:06
  • Do you have a wifi network you can use?
    – CoderMike
    Dec 14, 2020 at 16:10
  • Yes I have one. Now I am facing another problem. The RealVNC viewer is not responding so I can not get the screen. I tried rebooting both my laptop as well as raspberry pi but to no effect.
    – mANmAN01
    Dec 14, 2020 at 16:30
  • I tried to search the problem's solution online. People were suggesting that the power provided to the board was not enough. I am using a 5V 3A charger to power the board as recommended by Raspberry. So I think the problem is not from that side.
    – mANmAN01
    Dec 14, 2020 at 16:45

2 Answers 2


Just a suggestion, too long for a comment:

Forget VNC for the moment, only ssh.

ssh [email protected], or whatever the IP of your pi is. You'll be asked for the password.

After login, sudo apt-get install screen. If installed, screen -S term1. You get a new prompt, do sudo apt-get update. Whatever now happens to your ssh-connection, the update will run as long as the raspi works.

If you loose the connection, come back with a new ssh-session and type screen -r. You can do then sudo apt-get upgrade.

If you don't quite understand, google about screen and ssh.

  • This will not work with a simple reconnect to screen (screen -r). The screen wasn't detached. I think you have to use screen -D -RR-
    – Ingo
    Dec 16, 2020 at 17:02
  • @Ingo Or screen -r term1. We'll see what works, but however, if he uses screen, the update doesn't brake with termination of the ssh or vnc connection.
    – Keks Dose
    Dec 16, 2020 at 17:05
  • 1
    Not sure: if ssh breaks, then it is likely that the network interface lost the connection. In this case the update will also fail.
    – Ingo
    Dec 16, 2020 at 17:12
  • @Ingo Yes, without internet no update. But with screen, at least the loss of the ssh connection won't terminate the update.
    – Keks Dose
    Dec 16, 2020 at 17:15
  • Correct, but always updating with screen is a workaround but not really a solution of a still existing problem, isn't it?
    – Ingo
    Dec 16, 2020 at 17:22

You either have a hardware problem (the power supply is a typical suspect, but it's not the only one), a very unstable network, or your Pi cannot be upgraded with regular commands anymore, either because of the config changes, or because previous failed upgrades ruined the config somehow. All those things are hard to diagnose without having access to your Pi.

A fresh installation of Pi OS on a working hardware can be upgraded via SSH without any issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.