User avatar
jadro
Posts: 429
Joined: Sun Oct 02, 2016 1:20 pm
Location: Croatia

Update and upgrade question

Tue Dec 06, 2016 11:48 am

Hi,
from time to time I usually do this:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get clean
and this is ok...

In past few days I found message down in picture that says that sonic-pi have been kept back.
1. Does this mean that it has been restored to previous version or that it hasn't been updated?

2. One of messaage says that 1 not upgraded, I think it is sonic-pi, yes?

3. And there is a message that there were following packages installed but no longer required. Use apt-get autoremove to remove them... Is this all I have to do or do i need sudo apt-get autoremove? And do I need to named package like sudo apt-get autoremove libasn1-8-heimdal libgssapi3-heimdal libhcrypto4-heimdal etc... or just apt-get autoremove to remove all of them?

Thanks,
Jadro
Attachments
rpi.PNG
rpi.PNG (30.74 KiB) Viewed 3137 times
Oracle backend database developer
SmartHome IoT & Microprocessor enthusiast and hobbyist

User avatar
topguy
Posts: 5935
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Update and upgrade question

Tue Dec 06, 2016 12:42 pm

"upgrade" will not install any additional packages that is not already in the system.
"kept-back" means that there exists a newer version of a package but the update has a new dependency and you are only doing "upgrade".

"dist-upgrade" will install all updated versions and install new dependencies.
"autoremove" should remove all packages that no longer is needed by other packages.

Code: Select all

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get autoremove
sudo apt-get clean

User avatar
jadro
Posts: 429
Joined: Sun Oct 02, 2016 1:20 pm
Location: Croatia

Re: Update and upgrade question

Tue Dec 06, 2016 12:44 pm

Thanks,
Jadro
Oracle backend database developer
SmartHome IoT & Microprocessor enthusiast and hobbyist

fruitoftheloom
Posts: 21048
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Update and upgrade question

Tue Dec 06, 2016 4:48 pm

jadro wrote:Thanks,
Jadro
https://linux.die.net/man/8/apt-get
Retired disgracefully.....
This at present is my daily "computer" https://www.asus.com/us/Chrome-Devices/Chromebit-CS10/

mfa298
Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: Update and upgrade question

Tue Dec 06, 2016 5:06 pm

topguy wrote: "autoremove" should remove all packages that no longer is needed by other packages.
Added bold to the key part of that statement, the autoremove packages are things that were installed for other packages which you've probably since un-installed. This doesn't always mean that you don't need those packages.

I heard a story from a friend once where they have installed php on a server which brought in the mysql libraries, they then found that version of php wasn't suitable so uninstalled it and compiled php from source (using the mysql libraries that had been installed as dependencies). At a later point another colleague of his did an autoremove which removed the mysql libraries (as no package was requiring them), the site then stopped working.

robbes
Posts: 144
Joined: Sun Jan 20, 2013 7:11 pm
Location: Canada - off the west coast

Re: Update and upgrade question

Tue Dec 06, 2016 5:36 pm

Use the newer
apt
command: saves wear and tear on your fingers and your keyboard, and gives you some nice progress bars.

wildfire
Posts: 561
Joined: Sat Sep 03, 2016 10:39 am
Location: Dundee, Scotland

Re: Update and upgrade question

Tue Dec 06, 2016 6:03 pm

robbes wrote:Use the newer
apt
command: saves wear and tear on your fingers and your keyboard, and gives you some nice progress bars.
Yep, it also makes more sense than apt-get -remove, why are you typing get to remove something???
E8 85 A2 64 C9 64 81 94 64 81 95 64 89 84 89 96 A3
Still NF Shirls

User avatar
jadro
Posts: 429
Joined: Sun Oct 02, 2016 1:20 pm
Location: Croatia

Re: Update and upgrade question

Wed Dec 07, 2016 11:10 am

You mean
apt update
upt upgrade
upt clean
or how?
Oracle backend database developer
SmartHome IoT & Microprocessor enthusiast and hobbyist

tpylkko
Posts: 383
Joined: Tue Oct 14, 2014 5:21 pm

Re: Update and upgrade question

Wed Dec 07, 2016 2:01 pm

Read the manual and use it how you see fit

Code: Select all

man apt

User avatar
jadro
Posts: 429
Joined: Sun Oct 02, 2016 1:20 pm
Location: Croatia

Re: Update and upgrade question

Wed Dec 07, 2016 2:02 pm

Thanx
Oracle backend database developer
SmartHome IoT & Microprocessor enthusiast and hobbyist

User avatar
jadro
Posts: 429
Joined: Sun Oct 02, 2016 1:20 pm
Location: Croatia

Re: Update and upgrade question

Fri Dec 09, 2016 11:20 am

After hit sudo apt-get autoremove there are wiringpi and some keyboard packages that is to be REMOVED.
Why wiringpi and this keyboard-shortcut?
Does any of forum experts have problem after remove these with autoremove? Wiringpi is one of the basics for gpio no? I do lot with GPIO and Python and i have fear about this...
remove.PNG
remove.PNG (16.96 KiB) Viewed 2586 times
Jadro
Oracle backend database developer
SmartHome IoT & Microprocessor enthusiast and hobbyist

mfa298
Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: Update and upgrade question

Fri Dec 09, 2016 11:46 am

jadro wrote:After hit sudo apt-get autoremove there are wiringpi and some keyboard packages that is to be REMOVED.
Why wiringpi and this keyboard-shortcut?
Does any of forum experts have problem after remove these with autoremove? Wiringpi is one of the basics for gpio no? I do lot with GPIO and Python and i have fear about this...
remove.PNG
Jadro
See my earlier post (viewtopic.php?f=63&t=167587&p=1079586#p1078175) about what autoremove does.

User avatar
jadro
Posts: 429
Joined: Sun Oct 02, 2016 1:20 pm
Location: Croatia

Re: Update and upgrade question

Fri Dec 09, 2016 12:09 pm

mfa298 wrote:See my earlier post (viewtopic.php?f=63&t=167587&p=1079586#p1078175) about what autoremove does.
Yes I saw it and this was the reason why I did not remove this till now.
My question was twosided... if any of user have problem whit GPIO stuff after remove this... if not, I dont see why I shoudn't do this.
Ofcourse, I need to backup my SD card... And tested GPIO and wiringpi after doing this

Jadro
Oracle backend database developer
SmartHome IoT & Microprocessor enthusiast and hobbyist

dgordon42
Posts: 764
Joined: Tue Aug 13, 2013 6:55 pm
Location: Dublin, Ireland

Re: Update and upgrade question

Fri Dec 09, 2016 1:23 pm

About removing 'wiringpi':
I saw this last May when 'pigpio' was added to the Raspbian Jessie download. I think it replaced 'wiringpi' in the standard download, so now 'apt-get' autoremoves 'wiringpi'. I let it autoremove 'wiringpi', and then I installed it again. Both packages have been working normally ever since.

I don't know anything about 'xfce-keyboard-shortcuts', if you need them just reinstall them.

Hope this helps,
Dave.

mfa298
Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: Update and upgrade question

Fri Dec 09, 2016 2:05 pm

jadro wrote:
mfa298 wrote:See my earlier post (viewtopic.php?f=63&t=167587&p=1079586#p1078175) about what autoremove does.
Yes I saw it and this was the reason why I did not remove this till now.
My question was twosided... if any of user have problem whit GPIO stuff after remove this... if not, I dont see why I shoudn't do this.
Ofcourse, I need to backup my SD card... And tested GPIO and wiringpi after doing this

Jadro
That probably depends on what's in that package ("dpkg -L wiringpi" will tell you the files in it) and whether what you're doing uses wiringpi. There are several ways to address the gpio on the Pi and wiringpi is a library that helps with one of those ways.

User avatar
jadro
Posts: 429
Joined: Sun Oct 02, 2016 1:20 pm
Location: Croatia

Re: Update and upgrade question

Fri Dec 09, 2016 2:11 pm

Thanx...
Oracle backend database developer
SmartHome IoT & Microprocessor enthusiast and hobbyist

User avatar
jadro
Posts: 429
Joined: Sun Oct 02, 2016 1:20 pm
Location: Croatia

Re: Update and upgrade question

Fri Dec 09, 2016 6:53 pm

Afterall, i do sudo apt-get autoremove and yes, my wiringPi was REMOVED and I wasn't able to put GPIO ON or OFF from webpage.
Then I install wiringPi:

Code: Select all

sudo apt-get update && sudo apt-get upgrade
[email protected] ~ $ git clone git://git.drogon.net/wiringPi
...
[email protected] ~ $ cd wiringPi
[email protected] ~/wiringPi $ git pull origin
[email protected] ~/wiringPi $ ./build
...
[email protected] ~/wiringPi $ gpio readall
and my GPIO are operable again from webpage.

This is message after install:
wp.PNG
wp.PNG (41.8 KiB) Viewed 2303 times
but for now, everything seem to work.
Jadro
Oracle backend database developer
SmartHome IoT & Microprocessor enthusiast and hobbyist

mfa298
Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: Update and upgrade question

Sat Dec 10, 2016 9:53 am

jadro wrote:Afterall, i do sudo apt-get autoremove and yes, my wiringPi was REMOVED and I wasn't able to put GPIO ON or OFF from webpage.
Then I install wiringPi:

Code: Select all

sudo apt-get update && sudo apt-get upgrade
[email protected] ~ $ git clone git://git.drogon.net/wiringPi
...
[email protected] ~ $ cd wiringPi
[email protected] ~/wiringPi $ git pull origin
[email protected] ~/wiringPi $ ./build
...
[email protected] ~/wiringPi $ gpio readall
and my GPIO are operable again from webpage.

This is message after install:
wp.PNG
but for now, everything seem to work.
Jadro
On thing to note there is that you've uninstalled the packaged version of wiringpi and installed the latest version from source code.

apt-* commands work on packages which have already been compiled for you and will also get updates (usually only for bugs) via apt-get upgrade, compiling from source means you can have more control over how it's built and you'll get the latest version but you'll need to manually update it.

User avatar
jadro
Posts: 429
Joined: Sun Oct 02, 2016 1:20 pm
Location: Croatia

Re: Update and upgrade question

Sat Dec 10, 2016 12:55 pm

mfa298 wrote: apt-* commands work on packages which have already been compiled for you and will also get updates (usually only for bugs) via apt-get upgrade, compiling from source means you can have more control over how it's built and you'll get the latest version but you'll need to manually update it.
O, I didn't know this, why apt-get upgrade does not update the packages that I have installed manually?
Do I need sudo apt-get upgrade wiringPi to upgrade if there is a new version?

Thanx,
Jadro
Oracle backend database developer
SmartHome IoT & Microprocessor enthusiast and hobbyist

User avatar
jadro
Posts: 429
Joined: Sun Oct 02, 2016 1:20 pm
Location: Croatia

Re: Update and upgrade question

Sat Dec 10, 2016 12:57 pm

If I upgrade to last version of wiringPi manually, do i need to compile it ([email protected] ~/wiringPi $ ./build) or not?
Oracle backend database developer
SmartHome IoT & Microprocessor enthusiast and hobbyist

mfa298
Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: Update and upgrade question

Sat Dec 10, 2016 1:41 pm

jadro wrote:
mfa298 wrote: apt-* commands work on packages which have already been compiled for you and will also get updates (usually only for bugs) via apt-get upgrade, compiling from source means you can have more control over how it's built and you'll get the latest version but you'll need to manually update it.
O, I didn't know this, why apt-get upgrade does not update the packages that I have installed manually?
Do I need sudo apt-get upgrade wiringPi to upgrade if there is a new version?
apt-get upgrade will only upgrade the packages it knows about that you've installed (i.e. things installed via apt-get install) if you compile from source then apt won't know about it.

For wiring Pi is looks like there's little difference between the packaged version and the version in git. For other packages there can be a huge difference. For instance the packaged version of vlc is 2.2.1 If you downloaded the source and compiled it yourself you'd get 2.2.4 (in some cases the difference can be much greater).

The benefit of installing something from the package (especially for larger packages) is that someones done the hard work for you. Compiling something like vlc may take a while determining and installing the required dependencies, best options to configure it with and then an hour to compile. Installing via apt-get someone has effectively done that work for you and and provided the end product that you can just install.

Going back to the version differences, part of the reason for this is that most linux distributions will keep the same version of the software and only apply security fixes. If they moved up the versions then it might introduce new features or change how the software works. For something like vlc that isn't an issue. For other packages (e.g. the webserver apache) that might cause issues for the person running a website (you generally don't want updates to break your web server)

User avatar
jadro
Posts: 429
Joined: Sun Oct 02, 2016 1:20 pm
Location: Croatia

Re: Update and upgrade question

Sat Dec 10, 2016 3:37 pm

Thanks for the detailed reply and clarification,
Jadro
Oracle backend database developer
SmartHome IoT & Microprocessor enthusiast and hobbyist

Return to “General discussion”