![]() Get:10 jammy-security InRelease Ġ upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Before proceeding ensure that your software is up to date by running: sudo apt update sudo apt upgrade. Sorry, something went is the output from my terminal when I ran your modified script: $. So when you run update command, it downloads the package information from the Internet. The sources often defined in the /etc/apt/sources.list file and other files located in /etc/apt/ directory. Sudo do-release-upgrade -f DistUpgradeViewNonInteractive The sudo apt-get update command is used to download package information from all configured sources. Perhaps something like this may be more fitting: #!/bin/bash If it's any consolation, I run the simpler script as a daily cronjob with the noninteractive do-release-upgrade command ( sudo do-release-upgrade -f DistUpgradeViewNonInteractive provided by above) on all of my production 22.04 servers without any issues. Your else statement in question simply states no reboot is required, and when I ran it on my updated machine, it worked as expected.Ĭan you please be a bit more specific with regard to what's not working properly? Hey Nice work! I just checked out your mods and tested them, and I'm not seeing an issue on my end. If you have an account, sign in now to post with your account. Sudo apt-get -qy -o "Dpkg::Options::=-force-confdef" -o "Dpkg::Options::=-force-confold" dist-upgrade # Questions that you really, really need to see (or else). maybe not the cleanest but useful for beginners like me, but it doesnt work as intended. i modified it to adapt to 22.04 to include noninteractive mode. I usually install this and run it as a corn job daily or weekly depending on the server. Read -p "Would you like to reboot now? " ynĪlso, here's a simple unattended upgrade script. For example, apt update or apt-get update update the list of available software packages from the official repositories. #!/bin/bashĮcho 'APT distributive upgrade finished.'Įcho "Update Complete! Press Y/N to reboot." You can run two (in general: many) commands ('chained' with &, or. ![]() ![]() One way to deal with this is to run apt-get upgrade with its own sudo: sudo apt-get update & sudo apt-get upgrade. Then it fails because of insufficient permissions. sudo apt dist-upgrade As user535733 mentioned in the comments there is a 3rd possibility to upgrade: sudo apt full-upgrade See here for a full explanation of the two. This just means youre connected to a Source Mirror server thats really. The apt upgrade or apt-get upgrade uses the information obtained to upgrade all the installed packages to the latest version. Then you might 'update and install' existing code by executing: sudo apt upgrade. If anyone's interested, I modified this script to give the option to reboot with Y/N. This (conditionally) runs apt-get upgrade without sudo. So when you run command apt-get update, you see a slow download speed for packages.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |