Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 04-04-2007, 10:31 PM   #1
Registered: Mar 2007
Posts: 41

Rep: Reputation: 15
upgradepkg -- what is it used for?

I've never been clear on what exactly upgradepkg does that the other pkgtool scripts doesn't do.

What I've always done is simply remove the old package then install the new package-- which, from its man page, is almost exactly what upgradepkg would've done.

Does upgradepkg does anything else that's so special?
Old 04-04-2007, 11:35 PM   #2
Registered: Feb 2004
Location: 33.31N -111.97W
Distribution: SuSE
Posts: 918

Rep: Reputation: 32
Originally Posted by arcanex
Does upgradepkg does anything else that's so special?
No, just as you described. That's it.
Old 04-04-2007, 11:45 PM   #3
Slackware Contributor
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,312

Rep: Reputation: 829Reputation: 829Reputation: 829Reputation: 829Reputation: 829Reputation: 829Reputation: 829
No, not exactly as he described it.
installpkg(8) installs the contents of a package.
removepkg(8) removes the contents of a package.
upgradepkg(8) first renames the original package (the one that will be removed), then installs the new package, then removes the original package. It won't remove files that are contained in any other package, so the new package that was just installed will be left alone - the only files that will actually be removed are ones that are not contained in the new package. One benefit of this is that you can actually see what changed in the package structure - this has saved my butt on more than a few occasions, because I could see immediately that there was something wrong with my package.
Long story short, it might seem like semantics, but using upgradepkg(8), you always have a copy of the package contents on your system, whereas with the original poster's method, you don't. I'll leave it as an exercise for the reader as to why this is important...
Old 04-06-2007, 03:46 AM   #4
Registered: Jan 2006
Location: Slovenia
Distribution: Slackware, Gentoo
Posts: 97

Rep: Reputation: 15
upgrdepkg is also great for automating installing procedure a bit - if you have many packages, you can upgradepkg *.tgz and only the ones you already have an older version installed will be upgraded. And the --install-new option enables you exactly what it says. So, besides what has already been told it's also more practical than removing/installing by hand.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
'upgradepkg' params during 10.2 -> 11.0 HaroldWho Slackware 3 11-27-2006 02:10 PM
Trying to upgradepkg mdadm ilhbutshm Slackware 1 09-17-2006 09:33 AM
How to use rsync and upgradepkg... halo14 Slackware 5 01-04-2005 08:41 PM
Does upgradepkg keep filepermissions? Worstje Slackware 4 06-19-2004 10:07 AM
upgradepkg problem strudli Linux - Software 0 09-10-2003 03:05 AM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:35 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration