Is there a way to avoid this step a check only the newly added ppa?
2 Answers
Well, I don't know a way to avoid checking for updates, but I can answer the original question.
When you add a PPA, Ubuntu has no way of knowing what packages are actually included. If you want to install software from the PPA, Ubuntu will need to "update" the software source to get the latest list of available software.
While this process "updates" all of the repositories on your system, it only downloads changes. If a repository hasn't changed since the last time your computer updated it, it will simply ignore it and move on. Even if repository information has changed, it only downloads the changes, and not the entire list.
Sources: What does 'Ign' mean when running an apt-get update?
http://ubuntuforums.org/showthread.php?t=231300.
And personal experience
Yes, this is possible, however you have to install the Y PPA Manager
from a PPA and run the main update
command which you want to avoid running, I understand that this sounds paradoxical, however if you choose this option then though you will have to do it once for this installation, you will never have to do it again. So if you have decided to go for this option run:
sudo apt-add-repository ppa:webupd8team/y-ppa-manager
sudo apt-get update
sudo apt-get install y-ppa-manager
And then you will be able to run the following command ever after to deal with future PPAs (though you will have to replace ppa:example/ppa
with the address of the PPA):
sudo update-ppa ppa:example/ppa
-
the update-ppa is part of Y ppa manager: webupd8.org/2012/07/y-ppa-manager-0087-released.html Jan 28, 2016 at 17:34
-
1This requires the addition of another PPA which requires using the command that the OP does not want to use so this is sort of a bit of a paradox...– user364819Jan 28, 2016 at 17:37
-
@ParanoidPanda Thanks for the edit; yes indeed is a paradox but will solve it for future ppa's– DnrDevilJan 28, 2016 at 17:46
-
@ParanoidPanda I think it's a valid answer, because the question means in my view that the OP just wants to avoid the unnecessary list updates and save time in the future after adding a PPA. I don't see any indication that he/she is not able or does not want to run the
apt-get update
command at all. Therefore +1 from me.– Byte Commander ♦Jan 28, 2016 at 18:33 -
@ByteCommander: Yes, this is useful, and good if the OP is fine with running the
apt-get update
command one more time, but if the OP instead is in immediate need of not running theapt-get update
command and needs a different command, then this answer won't be what they are looking for. However, if they are not in immediate need of running a different command, and just want this for future, then this answer is fine.– user364819Jan 28, 2016 at 21:26
/etc/apt/sources.list
file which only has the ppa listed, copy it in (after backing up your proper version of the file). Alternatively, if you have added the ppa usingadd-apt-repository
then a version of the file with all sources commented out, so that only the ppa in/etc/sources.list.d
is used, though you'd need to be careful of having other ppas in there.