LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   updating apps (https://www.linuxquestions.org/questions/linux-newbie-8/updating-apps-585117/)

hendoc 09-16-2007 02:03 PM

updating apps
 
I don't know how to update an app in Ubuntu Feisty. The command line either says "command not found" or "the update command takes no arguments". It tells me my Frostwire is old, but I have been unable to do anything about it. Could someone maybe give me a simple explanation for a not total newb, but still newb?

David the H. 09-16-2007 02:39 PM

What exactly are you trying to type in? If you're using the shell you have to make sure to enter the command in exactly. It sounds to me like you're just typing in 'update', which is incorrect and means you're probably calling up the wrong program.

The proper command is 'apt-get', with 'update' being the subcommand that refreshes the list of available programs. It usually goes like this:

'sudo apt-get update'
'sudo apt-get install <package>'
'sudo apt-get remove <package>' (to uninstall)

And to search for a package:

'apt-cache search <keyword>'

If there's a new version available, it will install it. If not, it will tell you that you already have the newest version. If you get a package-not-found error, then you may not have the right package name. Use the search pattern to locate the correct package to install (do note that search is apt-cache, not apt-get).

Actually, it's far easier just to use one of the graphical package installers. I prefer synaptic.

hendoc 09-16-2007 02:46 PM

Ok That's what I needed to know. I'll just use the synaptic package manager. Thanks for taking the time to help me.

jay73 09-16-2007 08:58 PM

You can get a recent Frostwire from here:
http://www.getdeb.net/

download to your computer and install with sudo dpkg -i [filename]

AceofSpades19 09-16-2007 09:45 PM

Quote:

Originally Posted by David the H. (Post 2893891)
What exactly are you trying to type in? If you're using the shell you have to make sure to enter the command in exactly. It sounds to me like you're just typing in 'update', which is incorrect and means you're probably calling up the wrong program.

The proper command is 'apt-get', with 'update' being the subcommand that refreshes the list of available programs. It usually goes like this:

'sudo apt-get update'
'sudo apt-get install <package>'
'sudo apt-get remove <package>' (to uninstall)

And to search for a package:

'apt-cache search <keyword>'

If there's a new version available, it will install it. If not, it will tell you that you already have the newest version. If you get a package-not-found error, then you may not have the right package name. Use the search pattern to locate the correct package to install (do note that search is apt-cache, not apt-get).

Actually, it's far easier just to use one of the graphical package installers. I prefer synaptic.

to upgrade an app it is
sudo apt-get -u dist-upgrade

David the H. 09-17-2007 07:05 AM

Excuse me? dist-upgrade upgrades the entire distro (from Feisty to Gutsy, for example), installing and uninstalling packages as needed to match the new version's requirements. It's something you should need to do only very rarely, and I doubt very highly that that's what the OP wants here. To upgrade a single package, you simply refresh the repository and re-install the new version over the old one.

AceofSpades19 09-17-2007 06:48 PM

I used to do that all the time on debian and ubuntu without a problem

jay73 09-17-2007 07:16 PM

Didn't you mean apt-get upgrade instead of dist-upgrade? That would certainly make a lot more sense.

AceofSpades19 09-17-2007 07:54 PM

I forget which website, will post it if I find it, says its better to run apt-get -u dist-upgrade then apt-get upgrade

David the H. 09-18-2007 12:24 AM

The main difference between upgrade and dist-upgrade is that dist-upgrade will remove packages, as well as install them. So you can really hose your system if you don't carefully observe what's it's doing when you run it. I know, because I've been there and done that. Had my entire kde environment removed, to be exact, and it was a nightmare figuring out how to get my installation back in order because of all the library dependencies involved. Try to install A and it removes B, etc.

'apt-get upgrade' won't leave you in situations like that, because it will only install or upgrade, never remove. It will simply skip any package update that involves removing a dependency.

I personally start by entering dist-upgrade, look very carefully at what it wants to do, and decide if it's safe to let it run. Often I have to back out of it and run a regular upgrade instead. Then I'll go back and handle any remaining package updates manually one-by-one, determining if it's safe to let it uninstall what it wants. Usually it's ok to say yes, because most of the time it only involves removing an old version of a library and installing an updated one with a new package name, but sometimes it wants to remove something important, and I have to let it wait until the proper dependencies get sorted out, usually by the next time I run the update.


All times are GMT -5. The time now is 04:35 AM.