Thanks for checking out my blog! I've been working in the IT Help Desk for a few years now and enjoying learning the fundamentals while exploring a diverse range of technologies. With Ubuntu 18.04, I changed to to use apt instead of apt-get. And I was using sudo apt-get update, sudo apt-get upgrade and sudo apt-get dist-upgrade to do the update and upgrade stuff. But it doesn’t install or upgrade any software packages. If you're logged in as the 'root user' then you don't need to type sudo before the commands. Before Ubuntu 18.04 was available, I was using Ubuntu 16.04. On the contrary, the sudo apt update command ensures that the system has the latest information about the available packages. You can chain these commands to help speed up the process by typing "sudo apt update & sudo apt upgrade". That's why you want to first run "apt update" and then "apt upgrade". However, many Linux users get confused between the use of apt-get upgrade and apt-get dist-upgrade. However, it’s recommended to run the sudo apt update command before sudo apt upgrade to ensure that the system has the latest information about available package updates before attempting to upgrade any installed package. The command to update new versions of currently installed packages is "apt upgrade". sudo apt-get update & sudo apt-get upgrade sudo apt-get update & sudo apt-get dist-upgrade The apt-get update part updates the local package cache and thus tells your system about the packages that can be upgraded. I don't remember what I was working on but I learned that "Apt update" updates the database of new package versions but it doesn't update packages that are already installed. After updating the lists, the package manager knows about available updates for the software you have installed. apt-get upgrade actually installs newer versions of the packages you have. I'd see the commands in tutorials often but never really looked into the difference. apt-get update updates the list of available packages and their versions, but it does not install or upgrade any packages. On the other hand, if you were to install Apache, squid, MySQL, or any other services similar that save their configuration files in /etc, these configuration files will be deleted if you use purge.One of the things I didn't realize when I first started learning Linux was that "apt update" didn't actually update the packages on the machine like I assumed (and didn't check the man (manual) pages!). So for example, if you were to purge Chrome, Firefox, Kodi, or any other that holds some configuration files inside your /home folder, these configuration files will stay there. home/Ubuntu_User), these files will not be touched ( Why does "Purge" not remove everything related to an app? ) What Are the Differences Between sudo apt-get update and sudo apt-get upgrade The main difference is that sudo apt-get update fetches the latest version of the package list from your distro's software repository, and any third-party repositories you may have configured. sudo apt full-upgrade: Installs updates ( add or remove packages ), equivalent of dist-upgrade. ![]() apt-get update/upgrade updates your devices operating system. ![]() In short, rpi-update updates your devices firmware, while. sudo apt upgrade: Strictly upgrades the current packages. These two commands are actually different. This of course, does not apply to packages that hold configuration files inside the user's home folder (e.g. I know that there are three command to update and then upgrade the whole system, these are: sudo apt update: Fetches the list of available updates. ![]() ![]() Purge - purge is identical to remove except that packages are removed and purged ( any configuration files are deleted too). If a plus sign is appended to the package name (with no intervening space), the identified package will be installed instead of removed. Note that removing a package leaves its configuration files on the system. Remove - remove is identical to install except that packages are removed instead of installed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |