Solved Updating the Linux software

Solved issue
@Skybear
Since you asked about differences, I suggest you to run man apt-get and man apt, it will list you all available options as well as what they do in more detail so that you can learn.


Yes, I very rarely run autoclean and autopurge, however I use the *purge instead of *remove also when removing manually a single package.
I don't see any purpose to keep config files of software that's gone unless I manually modified some configs myself and want to backup them.
I’m sorry, but use both
Code:
man apt-get
and
Code:
man apt
? I thought they were two ways of doing the same thing?
 


I thought they were two ways of doing the same thing?
apt-get is more advanced, has more options, that's the only difference you care about.
some options (switches) do the same thing but may be called differently.

For instance in apt install, the "apt" is command name and "install" is an option passed to command.
Example, apt-get has dist-upgrade while apt doesn't have it, but it has full-upgrade option.
apt has show option, which is borrowed from apt-cache command, so apt is more convenient and having only most frequently used options.
 
apt-get is more advanced, has more options, that's the only difference you care about.
some options (switches) do the same thing but may be called differently.

For instance in apt install, the "apt" is command name and "install" is an option passed to command.
Example, apt-get has dist-upgrade while apt doesn't have it, but it has full-upgrade option.
apt has show option, which is borrowed from apt-cache command, so apt is more convenient and having only most frequently used options.
Got it. I like writing, but it’s so open to misinterpretations. So, and this is only to understand, I should use apt-get since I want to learn, correct?
 
I use :

Code:
  sudo apt-get purge $(dpkg -l | grep '^rc' | awk '{print $2}')

to remove ALL config crap
 
I should use apt-get since I want to learn, correct?
I think yes, you'll learn more.
But then in addition to apt-get you'll also want to learn how to use apt-cache, apt-file, dpkg and dpkg-query.
This are not all commands, there are more but these are most often used and shared on forums.
 
Apt-get is pretty much deprecated, because modern apt does everything it did and more. Once upon a time apt-get was useful, but that time has passed. The only things absolutely necessary are 'apt update', which refreshes the available new package database, and either 'apt upgrade' or 'apt full-upgrade', depending on what you're running. For Stable, full-upgrade is superfluous, but if you're running Sid or Testing, it will remove packages if needed. Never, ever use the -y option if you're running either Sid or Testing, because bad things will happen at some point. Blindly accepting everything apt proposes is a ticket to disaster, because you need to check to make sure essential packages aren't going to be removed. Because so many packages are sometimes in the pipeline, they may not be in the correct order every time you update, and dependency issues can blow everything up. It's relatively safe in Stable, but I still will never do it. Murphy was an optimist wearing rose-colored glasses. All the rest of the commands are optional. I tend to use the autoremove command just to keep things tidy, but having unnecessary packages only takes up a little bit of storage space, no other downsides. Autoclean removes downloaded .deb files, which only take up some storage space, and might be convenient in a few instances. It's fine, because the packages can always be downloaded again, but not strictly necessary unless you're very, very short on system storage. Using --purge is probably good practice most of the time, but not always. It removes user data and configs, which isn't always desired. Choose wisely.
 
Apt-get is pretty much deprecated, because modern apt does everything it did and more. Once upon a time apt-get was useful, but that time has passed. The only things absolutely necessary are 'apt update', which refreshes the available new package database, and either 'apt upgrade' or 'apt full-upgrade', depending on what you're running. For Stable, full-upgrade is superfluous, but if you're running Sid or Testing, it will remove packages if needed. Never, ever use the -y option if you're running either Sid or Testing, because bad things will happen at some point. Blindly accepting everything apt proposes is a ticket to disaster, because you need to check to make sure essential packages aren't going to be removed. Because so many packages are sometimes in the pipeline, they may not be in the correct order every time you update, and dependency issues can blow everything up. It's relatively safe in Stable, but I still will never do it. Murphy was an optimist wearing rose-colored glasses. All the rest of the commands are optional. I tend to use the autoremove command just to keep things tidy, but having unnecessary packages only takes up a little bit of storage space, no other downsides. Autoclean removes downloaded .deb files, which only take up some storage space, and might be convenient in a few instances. It's fine, because the packages can always be downloaded again, but not strictly necessary unless you're very, very short on system storage. Using --purge is probably good practice most of the time, but not always. It removes user data and configs, which isn't always desired. Choose wisely.

Thanks for the very comprehensive explanation! Very cool.
 
Apt-get is pretty much deprecated, because modern apt does everything it did and more. Once upon a time apt-get was useful, but that time has passed. The only things absolutely necessary are 'apt update', which refreshes the available new package database, and either 'apt upgrade' or 'apt full-upgrade', depending on what you're running. For Stable, full-upgrade is superfluous, but if you're running Sid or Testing, it will remove packages if needed. Never, ever use the -y option if you're running either Sid or Testing, because bad things will happen at some point. Blindly accepting everything apt proposes is a ticket to disaster, because you need to check to make sure essential packages aren't going to be removed. Because so many packages are sometimes in the pipeline, they may not be in the correct order every time you update, and dependency issues can blow everything up. It's relatively safe in Stable, but I still will never do it. Murphy was an optimist wearing rose-colored glasses. All the rest of the commands are optional. I tend to use the autoremove command just to keep things tidy, but having unnecessary packages only takes up a little bit of storage space, no other downsides. Autoclean removes downloaded .deb files, which only take up some storage space, and might be convenient in a few instances. It's fine, because the packages can always be downloaded again, but not strictly necessary unless you're very, very short on system storage. Using --purge is probably good practice most of the time, but not always. It removes user data and configs, which isn't always desired. Choose wisely.
The apt-get command is not deprecated, nor has it been replaced or superceded by the apt command, nor has time passed for either of these commands. Some points about this were commented upon here: https://www.linux.org/threads/have-you-switched-to-new-apt-sources-list-format-yet.58033/post-278778.

The basic answers to the queries about apt and apt-get are in the manual pages, which are clear:
From man apt:
apt provides a high-level commandline interface for the package management
system. It is intended as an end user interface and enables some options better
suited for interactive usage by default compared to more specialized APT tools
like apt-get(8) and apt-cache(8).

From man apt-get:
apt-get is the command-line tool for handling packages, and may be considered
the user's "back-end" to other tools using the APT library. Several "front-end"
interfaces exist, such as aptitude(8), synaptic(8) and wajig(1).

There's more detailed information about the package system's use of apt and apt-get here:

Without repeating information, it may be useful to point out that development of the package management system in debian is on-going, as was conspicuously demonstrated recently with the rollback facility being added to it, commented upon here: https://www.linux.org/threads/using-apt-history-commands.65306/post-304777

In relation to use of the "full-upgrade" option, there's some care that can taken to avoid problems with it which are commented upon here: https://www.linux.org/threads/error-after-sudo-apt-update-sudo-apt-full-upgrade.57810/post-276756
 
The apt-get command is not deprecated, nor has it been replaced or superceded by the apt command, nor has time passed for either of these commands. Some points about this were commented upon here: https://www.linux.org/threads/have-you-switched-to-new-apt-sources-list-format-yet.58033/post-278778.

The basic answers to the queries about apt and apt-get are in the manual pages, which are clear:
From man apt:


From man apt-get:


There's more detailed information about the package system's use of apt and apt-get here:

Without repeating information, it may be useful to point out that development of the package management system in debian is on-going, as was conspicuously demonstrated recently with the rollback facility being added to it, commented upon here: https://www.linux.org/threads/using-apt-history-commands.65306/post-304777

In relation to use of the "full-upgrade" option, there's some care that can taken to avoid problems with it which are commented upon here: https://www.linux.org/threads/error-after-sudo-apt-update-sudo-apt-full-upgrade.57810/post-276756
Thanks for the clarification @osprey.
 
Apt-get is pretty much deprecated, because modern apt does everything it did and more. Once upon a time apt-get was useful, but that time has passed.

Not so, IME and IMO.

1. Apt does not respond well to being used in bash scripts, apt-get does.
2. For nearly every, if not every, Debian and Debian-based, Ubuntu and Ubuntu-based, and Linux Mint Mint distro you install, the installers use apt-get to pull in necessary packages from the repos to install them via dpkg. You can verify this for yourself via watching how the installer works, either by using the Toggle Log switch with Ubiquity/Subiquity or Calamares, or by running a terminal instance alongside, and invoking top.

Cheers

Wiz
 


Follow Linux.org

Members online

No members online now.

Top