Page 1 of 4 123 ... LastLast
Results 1 to 10 of 46

Thread: Best way to install packages

Hybrid View

  1. #1
    Join Date
    Nov 2024
    Beans
    Hidden!

    Best way to install packages

    Hi everyone.
    Im a new Ubuntu user and i have some questions about installing packages.
    What would be the best way to install software?
    I have read in some places that its better to use apt, but in other places i have seen that its better to download the deb from the official website of each software.

    If i install it from apt, will it automatically update to the new versions when i will do apt upgrade-update or do i would have to add the repositories?

    If i install it from the .deb, would it update in the future or would i would have to download the deb again?

    Thank you very much and sorry if the questions are stupid.

  2. #2
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 24.04 Noble Numbat

    Re: Best way to install packages

    You should certainly, particularly a new user of Ubuntu, steer well away from searching for and installing .deb packages from anywhere other than the Ubuntu repositories.

    Anything installed from the Ubuntu repos will be guaranteed secure and will update with the normal software updates whether you use the command line, sudo apt update/upgrade or the GUI version which i have never bothered with.

    As you become more acquainted with Linux and Ubuntu, there may be a very few things that have to be installed by other methods but don't concern yourself with them yet; just continue using the repos and ask again here if you find something you installed not working.
    Last edited by ajgreeny; November 8th, 2024 at 10:10 AM.

  3. #3
    Join Date
    Nov 2024
    Beans
    Hidden!

    Re: Best way to install packages

    Quote Originally Posted by ajgreeny View Post
    You should certainly, particularly a new user of Ubuntu, steer well away from searching for and installing .deb packages from anywhere other than the Ubuntu repositories.

    Anything installed from the Ubuntu repos will be guaranteed secure and will update with the normal software updates whether you use the command line, sudo apt update/upgrade or the GUI version which i have never bothered with.

    As you become more acquainted with Linux and Ubuntu, there may be a very few things that have to be installed by other methods but don't concern yourself with them yet; just continue using the repos and ask again here if you find something you installed not working.
    Hi ajgreeny!
    Do you mean that if i install Firefox with apt, in the future it will be updated to new versions when i will do apt update-upgrade?
    Do updates take longer to arrive or is there some inconvenience?

    And finally, is it necessary to add repositories to Ubuntu to update the software or isnt necessary?

    Thank you very much for your patience and kindness.

  4. #4
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    5,899

    Re: Best way to install packages

    Ubuntu 24.04 LTS comes with a software store application called "App Center" (see image) where you can find software by category or searching. Just search for "App Center" in the Overview Screen, accessed by Windows Key (aka Super Key).

    You can install using the terminal, but you must know the package name of the software.

    Ubuntu automatically updates some software (like Firefox), and provides security updates, but most software stays at the version that comes with the original Ubuntu install.

    The repositories are automatically configured for your system when you install. No need to deal with that.
    Attached Images Attached Images

  5. #5
    Join Date
    Apr 2007
    Beans
    3,146
    Distro
    Ubuntu

    Re: Best way to install packages

    The answer to your question is very simple: never download deb files. Install software using apt. This installs software packaged and tested for your distribution, and will automatically update if security issues are fixed. There will, however, not be updates to possible newer major versions of the software, except then for Firefox (which, however, is nowadays installed using a different system, "snap").

    You can also use the graphical tool to safely install software. Ubuntu now has two different systems to install software: the newer "snap" system, and the traditional APT system. The software tool will prefer snap-packaged versions if available, but you can always select the apt version yourself if you prefer (and if available).

    From the command line, software distributed using the traditional APT system is installed through the command "apt". For software distributed using the snap framework, "snap" is the command.

  6. #6
    Join Date
    Nov 2024
    Beans
    Hidden!

    Re: Best way to install packages

    Quote Originally Posted by Dennis N View Post
    Ubuntu 24.04 LTS comes with a software store application called "App Center" (see image) where you can find software by category or searching. Just search for "App Center" in the Overview Screen, accessed by Windows Key (aka Super Key).

    You can install using the terminal, but you must know the package name of the software.

    Ubuntu automatically updates some software (like Firefox), and provides security updates, but most software stays at the version that comes with the original Ubuntu install.

    The repositories are automatically configured for your system when you install. No need to deal with that.
    Quote Originally Posted by vanadium View Post
    The answer to your question is very simple: never download deb files. Install software using apt. This installs software packaged and tested for your distribution, and will automatically update if security issues are fixed. There will, however, not be updates to possible newer major versions of the software, except then for Firefox (which, however, is nowadays installed using a different system, "snap").

    You can also use the graphical tool to safely install software. Ubuntu now has two different systems to install software: the newer "snap" system, and the traditional APT system. The software tool will prefer snap-packaged versions if available, but you can always select the apt version yourself if you prefer (and if available).

    From the command line, software distributed using the traditional APT system is installed through the command "apt". For software distributed using the snap framework, "snap" is the command.
    Ive installed Ubuntu with minimum software, only installed the desktop environment.
    Ive then installed Firefox using apt:

    If Firefox releases a new version in a while, will it automatically update when i will do apt update-upgrade?
    How do i know which software i will need to add a repository to the Ubuntu archive?

    Sorry if im repetitive or these are silly questions, but i like to establish the knowledge and basic operation well.

    Thank you for your help and tips.

  7. #7
    Join Date
    Mar 2010
    Location
    Been there, meh.
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Best way to install packages

    Quote Originally Posted by joepesci2 View Post
    Ive installed Ubuntu with minimum software, only installed the desktop environment.
    Ive then installed Firefox using apt:

    If Firefox releases a new version in a while, will it automatically update when i will do apt update-upgrade?
    How do i know which software i will need to add a repository to the Ubuntu archive?

    Sorry if im repetitive or these are silly questions, but i like to establish the knowledge and basic operation well.

    Thank you for your help and tips.
    If you use apt (or any apt-based front-end) to install debian packages, then, yes, update/upgrade will get the version for the OS you are running, updated for security issues and sometimes for new features. However, the goal of any "release" is stability, so don't expect new features for 99% of the packages, just bug fixes and security updates.

    Now, Canonical has also decided to "help us" migrate to using snap packages. They do this for firefox, chromium, thunderbird, and a few other things. For those things, using apt install will pull a tiny .deb file that forces the snap version of the package to be installed. This can be desirable or terrible, depending on your needs and the specific package.

    By default, snaps packaged software checks for updates 4x every day. It is possible to change the period and delay checking, but as we all know, the tyranny of the default is a real thing.

    I patched once a week, usually on Saturday mornings, so my systems are stable and ready for work all the other days. About once every 3-5 yrs, something bad will happen with one of these patched upgrades, so I'd rather not waste time on Monday trying to solve a stupid issue. I want my computers to earn money and help me deal with clients. I've found how to use some snap commands to delay snap updates to happen only on Saturdays. Sadly, at 12:01am, Saturday, any snap packages are queued up to go and hunt for updates. It messes with my system backups. The snap interface doesn't allow finer control, sadly. I could do some network blocking outside of snapd, to get what I want, but that's a little more effort than I can justify.

    There are reasons why I only use LTS releases: https://blog.jdpfu.com/2010/07/29/wh...-linux-desktop --- it is a bit old, but still relevant. Package management and easy maintenance is a key reason why I've been using Linux a very long time. More important than any GUI, at least to me.

    The summary of my preferred order to choose to install programs is this:
    1. repo,
    2. snaps,
    3. PPAs,
    4. source,
    5. deb files


    More discussion on each

    • Always start with using the Distro packaged solutions first. APT.
    • Next, look for a trusted PPA and use that. PPAs integrate into the normal OS patching and a trusted PPA would provide updates as needed when dependent packages are updated.
    • Next would be a Snap/Flatpak/AppImage package. There are some downsides and upsides to using these. Canonical seems to think our computers are smartphones with 1 storage device and I suppose for that situation, Snaps aren't THAT bad. But they don't allow local control and people using more storage are likely to bang their head's into storage access restrictions.
    • Next would be a .deb/.rpm file. This will most likely break package dependencies and in 3-6 months, 1 package can prevent other important core packages from being updated. This is commonly known as "RPM Hell", but "APT Hell" would better fit on Ubuntu. There are 2 solutions for APT Hell. Remove the original .deb file that was manually installed OR do a fresh - clear-field - nuked-from-orbit - OS install.
    • Next would be using source code. This assumes it is a compiled language. For some small script programs (python/GoLang/Perl/Bash), that work in highly dynamic ways and need updating weekly, it would be preferred to use the original script install/update method and not the .deb file or snap or PPA or even Canonical Repos. But for larger projects with multiple dependencies and compiles, best to avoid manually installation, since this means you've just accepted the need to redo this at least monthly for as long as the system uses that program. All to stay patched and current.


    I think that list handles most situations. There can be exceptions, but those really need to be avoided by people who cannot fully commit to maintaining their systems.

    Snagged that from a LUG presentation I did a few years ago.

  8. #8
    Join Date
    Nov 2024
    Beans
    Hidden!

    Re: Best way to install packages

    Quote Originally Posted by TheFu View Post
    If you use apt (or any apt-based front-end) to install debian packages, then, yes, update/upgrade will get the version for the OS you are running, updated for security issues and sometimes for new features. However, the goal of any "release" is stability, so don't expect new features for 99% of the packages, just bug fixes and security updates.

    Now, Canonical has also decided to "help us" migrate to using snap packages. They do this for firefox, chromium, thunderbird, and a few other things. For those things, using apt install will pull a tiny .deb file that forces the snap version of the package to be installed. This can be desirable or terrible, depending on your needs and the specific package.

    By default, snaps packaged software checks for updates 4x every day. It is possible to change the period and delay checking, but as we all know, the tyranny of the default is a real thing.

    I patched once a week, usually on Saturday mornings, so my systems are stable and ready for work all the other days. About once every 3-5 yrs, something bad will happen with one of these patched upgrades, so I'd rather not waste time on Monday trying to solve a stupid issue. I want my computers to earn money and help me deal with clients. I've found how to use some snap commands to delay snap updates to happen only on Saturdays. Sadly, at 12:01am, Saturday, any snap packages are queued up to go and hunt for updates. It messes with my system backups. The snap interface doesn't allow finer control, sadly. I could do some network blocking outside of snapd, to get what I want, but that's a little more effort than I can justify.

    There are reasons why I only use LTS releases: https://blog.jdpfu.com/2010/07/29/wh...-linux-desktop --- it is a bit old, but still relevant. Package management and easy maintenance is a key reason why I've been using Linux a very long time. More important than any GUI, at least to me.

    The summary of my preferred order to choose to install programs is this:
    1. repo,
    2. snaps,
    3. PPAs,
    4. source,
    5. deb files


    More discussion on each

    • Always start with using the Distro packaged solutions first. APT.
    • Next, look for a trusted PPA and use that. PPAs integrate into the normal OS patching and a trusted PPA would provide updates as needed when dependent packages are updated.
    • Next would be a Snap/Flatpak/AppImage package. There are some downsides and upsides to using these. Canonical seems to think our computers are smartphones with 1 storage device and I suppose for that situation, Snaps aren't THAT bad. But they don't allow local control and people using more storage are likely to bang their head's into storage access restrictions.
    • Next would be a .deb/.rpm file. This will most likely break package dependencies and in 3-6 months, 1 package can prevent other important core packages from being updated. This is commonly known as "RPM Hell", but "APT Hell" would better fit on Ubuntu. There are 2 solutions for APT Hell. Remove the original .deb file that was manually installed OR do a fresh - clear-field - nuked-from-orbit - OS install.
    • Next would be using source code. This assumes it is a compiled language. For some small script programs (python/GoLang/Perl/Bash), that work in highly dynamic ways and need updating weekly, it would be preferred to use the original script install/update method and not the .deb file or snap or PPA or even Canonical Repos. But for larger projects with multiple dependencies and compiles, best to avoid manually installation, since this means you've just accepted the need to redo this at least monthly for as long as the system uses that program. All to stay patched and current.


    I think that list handles most situations. There can be exceptions, but those really need to be avoided by people who cannot fully commit to maintaining their systems.

    Snagged that from a LUG presentation I did a few years ago.



    Lets say i will install Obsidian via apt.
    If Obsidian releases a new version of their software in a few months, will it also update to that new version by running apt update/upgrade? Once i install Obsidian for the first time via APT, does it automatically add the Obsidian PPA or would i have to add it manually later?

    I have read your post carefully and i see that APT is definitely your favorite method, however i cant find any reason or argument for using Snap.
    It seems that even Flatpak would go way before Snap.
    Is there any advantage to using Snap? maybe there is but i cant see it.

    I dont really like having some applications via apt, some via snap, some via .deb... I mean, if everything can be done effectively, safely and consistently via APT, i think that would be great.

    Thank you very much for your help and kindness.

  9. #9
    Join Date
    Mar 2010
    Location
    Been there, meh.
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Best way to install packages

    Quote Originally Posted by joepesci2 View Post
    Lets say i will install Obsidian via apt.
    If Obsidian releases a new version of their software in a few months, will it also update to that new version by running apt update/upgrade? Once i install Obsidian for the first time via APT, does it automatically add the Obsidian PPA or would i have to add it manually later?
    Depends on what a "new version" means. It is contains bug fixes or security patches, then the version would change from 1.5.3 --> 1.5.4 and that would get updated. OTOH, if the updates are for new "features", then no, it wouldn't. Feature updates usually happen in 1.5.3 --> 1.6.x OR 1.5.3 --> 2.0.0 upgrades. Remember, the goal is for the software to be stable and NOT to add any new features.

    If you want new features, then you'll need either a flatpak or a snap or a PPA or the source code or a compatible .deb from someone on the internet which may or may not have nefarious extra code.

    Quote Originally Posted by joepesci2 View Post
    I have read your post carefully and i see that APT is definitely your favorite method, however i cant find any reason or argument for using Snap.
    It seems that even Flatpak would go way before Snap.
    Is there any advantage to using Snap? maybe there is but i cant see it.
    I'm not a fan of snaps or flatpaks for the most part. They are bloated, slow, have constraints that cannot be removed. You can read in long threads in these forums about all the reasons snaps may not be great for everyone. I've never used a flatpak and don't have any interest.

    I use AppImages for a few things. These are un-constrained, single-file, tools what are also bloated, slow, and contain, in theory, all the required dependencies for a program to run. AppImages don't get in my way like snaps and flatpaks do. They don't automatically update either. To update an appimage, assuming it doesn't have self-updating built-in, I have to go and file the location of the appimage to see what's there.

    Quote Originally Posted by joepesci2 View Post
    I dont really like having some applications via apt, some via snap, some via .deb... I mean, if everything can be done effectively, safely and consistently via APT, i think that would be great.
    I don't either, but I also enjoy the flexibility that different options provide. Be careful about the source for any programs you allow to run on your computer. That's the main warning.

    We already are trusting Canonical. We run there OS. We use their repos. We have assurances that the software in those repos that we get are actually reviewed and built without "extras" by people with reputations to maintain.

    Some PPAs are great, but not all of them. I only trust PPAs from reputable sources OR from the project team who created the software to begin with. For example, if I want to run Nextcloud and use a PPA, I'll use the PPA from the Nextcloud team, not "Joe's PPA of assorted curiosities". Reputation matters. For firefox, I use the Mozilla PPA, not "Stevo's Greatest Hits PPA".

    The same goes for Snaps, Flatpaks, AppImages. The source of the package matters. If I post a setup.exe on my website and say it is safe, nobody should believe me. We are entirely too trusting, especially if someone seems nice.

    There are always going to be software that isn't in the Canonical Repos. I write code and have some programs that will never been in Canonical's repos for a number of reasons. Some of those reasons are technical, but the main reason is political. Until the projects are popular enough, there's little reason for Canonical to include my software. Plus, I don't make deb packages for it and have no plans to ever do so. Having flexibility and control is why my suggested order of preference for installing software is in the order it is in. Snaps remove much of the control I want for almost everything. I have found 1 specific snap that I mostly like as a snap, not in any other installation method. It is some server software that I use many times a day. All the other snap packages, I would happily do without. In fact, I'd like to only have 1 snap package on only 1 of my systems and never, ever, worry that some other snap might be installed - ever.

  10. #10
    Join Date
    Jun 2010
    Location
    London, England
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Best way to install packages

    How do i know which software i will need to add a repository to the Ubuntu archive?
    Trying installing the package using apt and if your OS has not enabled the appropriate repository then you will get an error message.

    If you had told us that you installed Ubuntu as the Essentials I would not have wasted my time explaining about the App Centre and Software & Updater. You only have the terminal to install software.

    Next question: How do I find out what repositories have been enabled using only the terminal? I have no idea.

    Regards
    It is a machine. It is more stupid than we are. It will not stop us from doing stupid things.
    Ubuntu user #33,200. Linux user #530,530


Page 1 of 4 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •