From - Ubuntu tells me I have packages to upgrade when I don't. If you run apt-get update again after apt-get upgrade has been concluded, those messages at ssh login should go away. Ubuntu Community Ask! Sign up to join this community.
The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group.
Create a free Team What is Teams? Learn more. How to install updates via command line? Ask Question. Asked 9 years, 3 months ago. Active 1 year ago. Viewed 2. Improve this question.
Marlin Marlin 8, 3 3 gold badges 12 12 silver badges 5 5 bronze badges. Did you try this first: sudo apt-get clean this should clean the cache. Add a comment. Active Oldest Votes. Use this: sudo apt update Fetches the list of available updates sudo apt upgrade Installs some updates; does not remove packages sudo apt full-upgrade Installs updates; may also remove some packages, if needed sudo apt autoremove Removes any old packages that are no longer needed Documentation about each apt option can be found in the the manpages for apt.
Improve this answer. Wayne 3 1 1 bronze badge. SirCharlo SirCharlo Should I always restart with sudo reboot after it? I needed to add -y for it to work. Ubuntu It will usually inform you if a reboot is required.
Just pointing out that apt full-upgrade performs the same function as apt-get dist-upgrade , if, like me, you're comparing the commands with other answers in this question.
APT stands for Advanced Packaging Tool which is a tool that is used to manage software in our system and apt is the software used to communicate this APT software management tool. If you are interested to learn more about how software packages are managed in Linux I highly recommend reading the article in the link below. Hence the apt command is responsible for installation, removal, and updating of software in our system. A good analogy is to think of your computer as a factory and the apt command as the manager in that factory who is responsible for the installation of new equipment, removal of equipment that is no longer needed, and update desired equipment to their latest versions, while maintaining records of the equipment names and versions which are currently present in the factory.
Let us first learn what these commands individually mean and then combine them once we understand them each separately! All of these web addresses are repos that contain software. Continuing with our factory analogy, assume our manager is maintaining an excel sheet containing the list of parts available from various equipment manufacturers.
Here using the sub-command update we are telling our manager to contact all the equipment manufacturers and get data regarding the latest available equipment and redo his excel sheet! Continuing with our factory analogy, let us say all the workers are using a Macbook model for doing all computer tasks. Maybe you need to install a specific newly released software and leave the rest of the system untouched.
In that case, all you need to do is enter the following commands. But of-course, if you really need to upgrade all the packages in your system in a single line of command, you can also enter something like. To update the software package information from the online repository, run this command in the terminal:. Once the command completed, the last line in the output shows if updates are available for installed software packages on your Ubuntu system.
At this point it can get a bit confusing, because multiple apt commands exist for upgrading the software packages:. The apt-get program supports dist-upgrade and apt renamed this one to full-upgrade. For backward compatibility, apt implemented the dist-upgrade alias for this. With other words, with apt the commands full-upgrade and dist-upgrade are exactly the same. Okay, with that extra piece of information, we can shorten the command list to:. According the the apt MAN-page, the upgrade command does the following:.
If you run an Ubuntu or Debian based operating system, based on a fixed release cycle, you should use upgrade. For example Ubuntu The idea behind a fixed release cycle is that software versions stay the same and you only get security fixes. Therefore, it will not be necessary to actually remove a package, when upgrading installed software packages.
For the examples in this article, I run Ubuntu Budgie Consequently, I will use upgrade. To start the upgrade operation of your installed software packages, run the following command from the terminal:.
Before apt starts the actual software upgrade procedure, it first presents you with all the details:. Press y to proceed with the actual software upgrade operation. After starting the upgrade, you can follow its progress:. Some software packages require a system reboot to complete the update. For example an update to the Linux kernel itself. How do you know if your system requires a reboot after the update? If this file exists, then your system requires a reboot.
To find out if this file exists, you can run the cat command on this file. If this file exists and your system requires a reboot after running sudo apt upgrade , the command output looks like:. If your system does not require a reboot after running sudo apt upgrade , the file is not available.
In this case the command output looks like:. How to reboot your Ubuntu system from the terminal? You can achieve the system restart by running this command from the terminal:. Sometimes software packages remain on your system, even when your system no longer needs them. For example a software package that was installed as a dependency and you manually uninstalled the dependent software package. Kernel updates are another example. The new kernel requires a reboot to activate. This means that your system still needs the old kernel, until you rebooted your system.
To complete the update of your Ubuntu system, you could remove those software packages that your system no longer needs.
0コメント