- This topic has 7 replies, 5 voices, and was last updated Jul 17-8:54 pm by Anonymous.
-
AuthorPosts
-
July 9, 2018 at 2:05 pm #11349Member
Sadshark [p.n.2001]
This is just a PSA to all my fellow Linux users out there. Any time you are typing out commands by hand, such as upgrade or update commands, just know that apt-get is an obsolete turn of phrase. Here’s the reason why: “sudo apt update” does the exact same thing as “sudo apt-get update” , “sudo apt install x program” does the same as “sudo apt-get install x program.” I figured out about this change around the time Kubuntu 16.04 Xenial Xerus was released, as I think the change was instated at that time. This askubuntu theread here, specifically the first answer explains some minor differences between the two.
Don’t take my word for it. Try it for yourself!
Running antinataliX GNU/Linux 19.9 on my Compaq Mini 110c-1100
On my desktop running Kubuntu 18.04 LTS
The antinatalist antifascist childfree vegan mini-manifesto
Bertolt Brecht's beautiful poem, the Unconquerable Inscription.July 9, 2018 at 2:19 pm #11350Forum Admin
dolphin_oracle
::yeah and “apt” has some nice touches like progress bars which is nice. I’ve also been using it to install local debs as well.
apt install ./name_of_debwhich will get your depends pulled in, unlike dpkg and I think nicer than gdebi.July 9, 2018 at 2:24 pm #11351Member
Sadshark [p.n.2001]
::oh wow @dolphin_oracle I didn’t know you could apt install an actual .deb file. I ought to try that some time. Beats doing dpkg install and then having to install all those libraries by hand.
Running antinataliX GNU/Linux 19.9 on my Compaq Mini 110c-1100
On my desktop running Kubuntu 18.04 LTS
The antinatalist antifascist childfree vegan mini-manifesto
Bertolt Brecht's beautiful poem, the Unconquerable Inscription.July 14, 2018 at 3:11 am #11389Member
fungalnet
::apt upgrade and apt-get dist-upgrade are not the same thing.
apt dist-upgrade does not work.
Many other options on those two commands are different and will not do the same thing.
Nor are the differences between the two historically consistent, so you may find remarks in forums and archives that were valid before and are no longer valid. Debian has been going back and forth between which to have as primary use of pkg handling and which to phase out.anti-X - Adélie - obarun - systemd Free Space
July 17, 2018 at 1:40 pm #11436Member
Sadshark [p.n.2001]
::@fungalnet wtf of course
sudo apt dist-upgradeworks why would I lie for no god damn good reason? I just did it on both of my PCs! You need to just try things before being pointlessly, aimlessly argumentative about them. All the functions that most people would use, like sudo apt update, sudo apt upgrade, sudo apt install, sudo apt -f install, etc all work exactly the same and I’m sure you didn’t even try it to see before arguing.Running antinataliX GNU/Linux 19.9 on my Compaq Mini 110c-1100
On my desktop running Kubuntu 18.04 LTS
The antinatalist antifascist childfree vegan mini-manifesto
Bertolt Brecht's beautiful poem, the Unconquerable Inscription.July 17, 2018 at 5:31 pm #11440Anonymous
::ok let’s find some middle ground.
thanks and thanks.
Thanks for sharing the tip, Sadshark… and thanks fungalnet for the clarification.Yes, apt and apt-get are not “same thing”. No, apt-get is not “an obsolete turn of phrase”.
Many of the options available for each of those commands overlap and, confusingly, the default (implicit) apt preferences governing some of those options create “gotcha” traps leading to surprising / unexpected results.For instance, we can see a ready example — today, in the MX Linux forum: how to stop apt from deleting downloaded packages
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836598
Within apt preferences, “Binary::apt::APT::Keep-Downloaded-Packages” controls the behavior of apt
and “Binary::apt-get::APT::Keep-Downloaded-Packages” controls the behavior of apt-get.The implicit “keep” for apt-get is “1” (binary true)
Because it’s implicit, you won’t notice it if you run apt-config dump so might not even realize such a pref exists.
The implicit “keep” for apt is “0” (binary false). Again, “gotcha” — if you don’t realize such a pref exists, you wouldn’t know that you can change/override that pref.Another potential “gotcha” not yet mentioned in the MX posts:
Regardless of the apt preferences in effect, when the context is live-boot, or when performing a remaster operation… the persist-save and remaster-live scripts will ignore / discard the contents of the apt cache directory, unless you edit the default provided “excludes” configuration file those scripts consult.July 17, 2018 at 6:48 pm #11441Forum Admin
Dave
::Perhaps I am wrong but is the equivalent of apt-get dist-upgrade not apt full-upgrade?
Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown
July 17, 2018 at 8:54 pm #11442Anonymous
::https://manpages.debian.org/stretch/apt/apt.8.en.html
apt full-upgrade
full-upgrade performs the function of upgrade but will remove currently installed packages if this is needed to upgrade the system as a whole.
https://manpages.debian.org/jessie/apt/apt-get.8.en.html
apt-get dist-upgrade
dist-upgrade in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages; apt-get has a “smart” conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary. The dist-upgrade command may therefore remove some packages. The /etc/apt/sources.list file contains a list of locations from which to retrieve desired package files. See also apt_preferences(5) for a mechanism for overriding the general settings for individual packages.
–ignore-hold
Ignore package holds; this causes apt-get to ignore a hold placed on a package. This may be useful in conjunction with dist-upgrade to override a large number of undesired holds. Configuration Item: APT::Ignore-Hold.-y, –yes, –assume-yes
Automatic yes to prompts; assume “yes” as answer to all prompts and run non-interactively. If an undesirable situation, such as changing a held package, trying to install a unauthenticated package or removing an essential package occurs then apt-get will abort. Configuration Item: APT::Get::Assume-Yes.*if unattended-upgrades is installed / used, a “blacklist” can also workaround any permanently pinned packages
Unattended-Upgrade::Package-Blacklist { “name_of_pkg”; “name_of_another_pkg”; } -
AuthorPosts
- You must be logged in to reply to this topic.