LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-12-2022, 07:04 AM   #1
white_elefant
LQ Newbie
 
Registered: Oct 2022
Posts: 3

Rep: Reputation: 0
Update behaviour of APT


Hi,

I have a metapackage with a few dependencies. When I update the metapackage (apt-get install metapackage), only the metapackage itself is updated and not the corresponding dependencies. I think, this is a reasonable behaviour. However, is there a way to force an update of the dependencies during the "apt-get install"?

I already tried to determine and install the dependencies in the preinst script, but that logically won't work as the installer is locked during installation.

Thanks in advance!
W.E.
 
Old 10-12-2022, 07:11 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,804

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
apt-get upgrade is used to upgrade packages, not install.
 
Old 10-12-2022, 08:10 AM   #3
white_elefant
LQ Newbie
 
Registered: Oct 2022
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pan64 View Post
apt-get upgrade is used to upgrade packages, not install.
True, thanks.

I tried this, but that won't upgrade selectively my metapackage with the corresponding dependencies..
 
Old 10-12-2022, 08:23 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,681

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
apt update or apt-get update will download package information and get updated version of packages or their dependencies.

apt upgrade or apt-get upgrade will install available updates to all packages from the above information.

Before installing your package you should make sure the system is updated. While apt or apt-get checks for dependencies as far as I know it does not check for the latest packages which is why you need to make sure the system is updated prior to install your package.
 
Old 10-12-2022, 08:37 AM   #5
white_elefant
LQ Newbie
 
Registered: Oct 2022
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by michaelk View Post
apt update or apt-get update will download package information and get updated version of packages or their dependencies.

apt upgrade or apt-get upgrade will install available updates to all packages from the above information.

Before installing your package you should make sure the system is updated. While apt or apt-get checks for dependencies as far as I know it does not check for the latest packages which is why you need to make sure the system is updated prior to install your package.
Makes sense to me.

However, the question is: is it possible to trigger the update of only the dependent packages by updating/upgrading the metapackage?
 
Old 10-12-2022, 08:57 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,804

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
probably this: https://askubuntu.com/questions/3216...endencies-only
 
  


Reply



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
[SOLVED] synaptic, apt-get update, apt update all stopped working tnandy Linux - Software 6 09-09-2020 03:50 PM
[SOLVED] sudo apt update and sudo apt-get update giving error cryptonic472 Linux - Software 7 08-24-2019 08:16 AM
apt pinning /etc/apt/apt.conf parent's_basement Debian 5 10-26-2008 05:50 PM
apt-get update errors since Debian released ( bad /etc/apt/sources.list ?) forgox Debian 10 06-13-2005 12:28 PM
Does 'apt-get update' update the database used by 'apt-cache'? davidas Debian 5 04-20-2004 01:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 09:55 PM.

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