Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I'm having some difficulties exactly understanding how the the whole update thing work in linux (Ubuntu) and good practice for installing software. I understand I have a /etc/apt/sources.list file where all my repositories are listed, and that these repositories are queried when I use apt-get update --to later be used with eg. apt-get upgrade. This makes perfect sense and I recently installed spotify by adding deb stable non-free to this "sources" list.

But then I got confused...

When I went to download google chrome I merely had to download and grab a .deb file, and chrome is installed with no problem...but...I don't see any new entry in /etc/apt/ how does apt-get update know where to query concerning chrome updates? Has it somehow been added to one of the already listed repositories in the sources file?

I would like all my installed software to be encompassed by the update function.

Thanks a bunch for any help! :)

share|improve this question

2 Answers 2

up vote 4 down vote accepted

This is indeed kind of complicated. First, apt is a front-end to dkpg which actually handles installing/removing packages. So, /etc/apt/sources.list (and any files in /etc/apt/sources.list.d/) are read by apt, not dpkg.

Now, when you download a .deb file manually, you are bypassing apt and will use dpkg -i packagename.deb to install it instead. This means that apt's database will not be updated and that the apt system will have no knowledge of the package you installed. In other words, apt-get upgrade will never update any manually installed packages.

Having said that, chrome is actually an exception to the rule. When you go to its download page, you will see this message:

 enter image description here

At the bottom is this note:

Note: Installing Google Chrome will add the Google repository so your system will automatically keep Google Chrome up to date. If you don’t want Google's repository, do “sudo touch /etc/default/google-chrome” before installing the package.

This means that the .deb package includes a script that will add Google's repository to your system (specifically, it will create a file at /etc/apt/sources.list.d/) thereby ensuring that chrome will be updated when you use apt-get.

share|improve this answer
Ok, makes sense...but is there then any way to easily manage the updates for all my manually installed packages? – Kirbies Mar 15 '14 at 0:18
@Morten no, that's exactly why apt etc exist, if you step outside that system you're on your own. There are tricks but it is rarely worth the effort for the few packages you might install manually. – terdon Mar 15 '14 at 0:26
Ok, many thanks :) – Kirbies Mar 15 '14 at 13:28
The package manager actually doesn't care whether a package has been installed by dpkg or apt. If it finds a newer version of a package in the repositories that newer version gets installed. – Florian Diesch Jan 17 at 18:08
@FlorianDiesch yes, of course. My point was for packages that are not in the repositories. – terdon Jan 17 at 18:13

apt searches in the sources listed in /etc/apt/sources.list and also all files in /etc/apt/source.list.d. You will have a file such as google-chrome.list in /etc/apt/sources.list.d which will have the following line:

deb stable main

This is used as the source for updating google-chrome.

When you downloaded the deb file for google-chrome manually and installed it, a script in the deb file created this file, so that you don't have to manually search for updates.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.