Score:0

Unattended Apt-get upgrade does nothing

in flag

I'm trying to create a script that updates my Ubuntu installation at shutdown.

To upgrade my system I use the following command:

unbuffer apt-get full-upgrade -y --allow-downgrades --show-progress 2>&1 > /var/log/ubuntu-automatic-update/update_status.txt

But when it's executed, the log shows the following:

Package lists are read... 0%

Package lists are read... 100%

Package lists are read... Done

Dependency tree is built... 0%

Building dependency tree... 0%

Building dependency tree... 50%

Building dependency tree... 50%

Dependency tree is built... Done

Status information is read in... 0%

Status information is read in... 0%

Status information is read in... Done
0 updated, 0 reinstalled, 0 to remove and 168 not updated.

But running the exact same command manually in terminal updates everything. Though, it then tells me that 5 packages would be newly installed.

Can this somehow be fixed that it updates anyway?

Edit: The complete script can be found here: https://github.com/TobiPeterG/ubuntu_automatic_updates/edit/main/files/shutdown_update maybe I did an error in there?

user535733 avatar
cn flag
Rather than re-create the wheel, consider using the existing option for update-at-shutdown for security upgrades and kernel upgrades located at `/etc/apt/apt.conf.d/50unattended-upgrades`. Personally, I would not run a full-upgrade unattended.
Nmath avatar
ng flag
*"168 not updated"* - Why would you attempt to create an automated script when you are so far behind on maintenance? I agree that your plan is a bad one and also confused why you are so far behind on updates.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.