Apt-get update only for a specific repository


Answer #: 1

yes, apt-get can do that, and can do it in a nice way.

Append following to ~/.bash_funcs

update-repo() { for source in "$@"; do sudo apt-get update -o Dir::Etc::sourcelist="sources.list.d/${source}" \ -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" done }

Append following to ~/.bashrc

if [ -f $HOME/.bash_funcs ]; then . $HOME/.bash_funcs fi

Append following to ~/.bash_completion

# Debian user-defined completion -*- shell-script -*- _ppa_lists(){ local cur _init_completion || return COMPREPLY=( $( find /etc/apt/sources.list.d/ -name "*$cur*.list" \ -exec basename {} \; 2> /dev/null ) ) return 0 } && complete -F _ppa_lists update-repo

Then source the files

. ~/.bashrc . ~/.bash_completion

Done and start to fire it


You can update a single ppa repository without having to update whole apt source, with implement of bash-completion.

Answer #:...

0 0

When I add a PPA and I want to install some of its content, it is quite annoying to re-update all my apt list using apt-get update.

Is it instead possible to only sync the content of a given repository?

Other Tips. I am working on the best way to eliminate Windows XP from my older desktop and replace it with Linux Ubuntu 12.04 LTS as my sole operating system. I've done a dual boot alongside Windows to get used to Ubuntu like many people have done. Now, I would like to totally have Ubuntu as the OS. Any suggestions? I've read that if you've had problems with a CD, disc, install that some have gone to a network boot option and had to upgrade their BIOS if their older desktop doesn't match. Am I thinking correctly? Before you begin, you want to make sure that all of the data from your Windows installation is safely backed up, or moved to your Ubuntu partition. Also read these instructions briefly to ensure that they make sense. Boot from the Ubuntu live CD. Open...

0 0

Package: apt

Version: 0.9.9

Severity: wishlist

Hi maintainers,

It would be useful to have the ability to apt-get update a single
repository, without touching the state of other repositories or
downloading their package lists. Updating a single sources.list.d file
would also suffice, and might be easier in terms of syntax.

The primary use case for this would be sbuild: currently, the apt resolver
needs to create a new repository inside the chroot and make apt aware of
it, but if sbuild is run without --apt-update, running `apt-get update`
(which updates every repository) would be inappropriate. So it resorts to
doing some black magic to write out the appropriate /var/lib/apt/lists/
file without actually invoking apt:


Being able to run `apt-get update sbuild-build-depends-archive.list` or

0 0

I am using Cubian X1, a customized Debian wheezy distro, on my Cubietruck ARM board.

Running apt-get update fails, as it tries to connect to mirror.isoc.org.il mirror which is filtered inside Iran, along with other domain/IPs hosted in Israel.

Here is the contents of /etc/apt/sources.list:

deb http://http.debian.net/debian/ wheezy main contrib non-free deb http://http.debian.net/debian/ wheezy-updates main contrib non-free deb http://http.debian.net/debian wheezy-backports main deb http://security.debian.org/ wheezy/updates main contrib non-free deb http://packages.cubian.org/ wheezy main non-free deb http://repo.ajenti.org/debian main main debian

I've commented out the isoc.org.il references inside these two files too:

/usr/share/python-apt/templates/Ubuntu.mirrors /usr/share/python-apt/templates/Debian.mirrors

But apt-get update still fails with the following messages:

W: Failed to fetch http://http.debian.net/debian/dists/wheezy/Release.gpg...
0 0
parameter required default choices comments allow_unauthenticated

(added in 2.1)

no no

Ignore if packages cannot be authenticated. This is useful for bootstrapping environments that manage their own apt-key setup.


(added in 2.1)


If yes, remove unused dependency packages for all module states except build-dep.


If update_cache is specified and the last run is less or equal than cache_valid_time seconds ago, the update_cache gets skipped.


(added in 1.6)


Path to a .deb package on the remote machine.

If :// in the path, ansible will attempt to download deb before installing. (Version added 2.1)


Corresponds to the -t option for apt and sets pin priorities

no force-confdef,force-confold

Add dpkg options to apt command. Defaults to '-o "Dpkg::Options::=--force-confdef" -o...

0 0

I got error massages like failed to fetch, unable to connect:

With these source.list repositories. I even tried and it joined but there were different errors.

I have Backtrack 5 r3, had same issue with r2. Is the problem that I'm running it on virtual box / vmware? I can connect to internet but I guess those repositories are outdated or something.

deb http://all.repository.backtrack-linux.org revolution main microverse non-free testing . deb http://32.repository.backtrack-linux.org revolution main microverse non-free testing . deb http://64.repository.backtrack-linux.org revolution main microverse non-free testing . deb http://source.repository.backtrack-linux.org revolution main microverse non-free...

0 0
APT HOWTO (Obsolete Documentation) - Managing packages

[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ next ]

3.1 Updating the list of available packages

The packaging system uses a private database to keep track of which packages are installed, which are not installed and which are available for installation. The apt-get program uses this database to find out how to install packages requested by the user and to find out which additional packages are needed in order for a selected package to work properly.

To update this list, you would use the command apt-get update. This command looks for the package lists in the archives found in /etc/apt/sources.list; see The /etc/apt/sources.list file, Section 2.1 for more information about this file.

It's a good idea to run this command regularly to keep yourself and your system informed about possible package updates, particularly security updates.


0 0

apt.postgresql.org FAQ

General Questions

What's the difference between the PostgreSQL packages provided by Debian/Ubuntu and by the PGDG apt repository?

Pretty little, actually. The PGDG packages are built from the same source as the Debian packages (Ubuntu is using the same source for the PostgreSQL server packages as well). We try to follow Debian unstable's versions as close as possible, i.e. the packages available here are the same, just rebuilt with a ".pgdg" appended to the version number. We are also using the same postgresql-common infrastructure packages.

Should I use Debian/Ubuntu's packages, or the PGDG packages?

Debian and Ubuntu only ship one PostgreSQL server version per release. For example, there is only PostgreSQL 8.4 in Debian Squeeze/6.0. If that is the version you want, use it. There is no real difference. If you want a different PostgreSQL server version, use the PGDG packages.

Same goes for extension...

0 0

This article explains how quickly you can learn to install, remove, update and search software packages using apt-get and apt-cache commands from the command line. This article provides some useful commands that will help you to handle package management in Debian/Ubuntu based systems.

APT-GET and APT-CACHE Commands

What is apt-get?

The apt-get utility is a powerful and free package management command line program, that is used to work with Ubuntu’s APT (Advanced Packaging Tool) library to perform installation of new software packages, removing existing software packages, upgrading of existing software packages and even used to upgrading the entire operating system.

What is apt-cache?

The apt-cache command line tool is used for searching apt software package cache. In simple words, this tool is used to search software packages, collects information of packages and also used to search for what available packages are ready for installation on Debian or Ubuntu...

0 0

Steps for a Fresh Installation of MySQL

Adding the MySQL APT Repository

First, add the MySQL APT repository to your system's software repository list. Follow these steps:

Go to the download page for the MySQL APT repository at http://dev.mysql.com/downloads/repo/apt/.

Select and download the release package for your Linux distribution.

Install the downloaded release package with the following command, replacing version-specific-package-name with the name of the downloaded package (preceded by its path, if you are not running the command inside the folder where the package is):


For example, for version w.x.y-z of the package, the command is:


Note that the same package works on all supported Debian and Ubuntu platforms.

During the installation of the...

0 0

This is a small guide on how to add official Kali Linux Repositories – I’ve updated it to include all versions of Kali Linux till date i.e. Kali 1.x, Kali 2.0/Kali Sana and Kali Rolling.

The single most common causes of a broken Kali Linux installation are following unofficial advice, and particularly arbitrarily populating the system’s sources.list file with unofficial repositories. The following post aims to clarify what repositories should exist in sources.list, and when they should be used.

Any additional repositories added to the Kali sources.list file will most likely BREAK YOUR KALI LINUX INSTALL.

Edit your sources.list

The easiest way is to edit the /etc/apt/sources.list

root@kali:~# vi /etc/apt/sources.list (or) root@kali:~# leafpad /etc/apt/sources.list

Add official repo’s only:

Copy paste the following repositories (remove existing lines or you can comment them out – your take). Following repo list was taken from official...

0 0

Probably default knowledge to most, but I didn't find it right way. Turns out the "install" parameter, is also the "upgrade" control for a specific package.

If you're trying to update a specific package, do this:

apt-get install

If the package's already installed, the latest version will be installed on top of it. Using "install" as the upgrade parameter -- who comes up with these things. :-)

Here's a useful overview of all apt-get options: apt-get package management cheat sheet.

Hi! My name is Mattias Geniar. I'm a Support Manager at

Nucleus Hosting

in Belgium, a general web geek,

public speaker



. If you're interested in keeping up with me, have a look at my podcast and weekly newsletter below. For more updates, follow me on Twitter as



SysCast podcast

In the SysCast podcast I talk about Linux & open source projects, interview sysadmins or developers and discuss...

0 0

Each active line of the /etc/apt/sources.list file contains the description of a source, made of 3 parts separated by spaces.

The first field indicates the source type:

“deb” for binary packages,

“deb-src” for source packages.

The second field gives the base URL of the source (combined with the filenames present in the Packages.gz files, it must give a full and valid URL): this can consist in a Debian mirror or in any other package archive set up by a third party. The URL can start with file:// to indicate a local source installed in the system's file hierarchy, with http:// to indicate a source accessible from a web server, or with ftp:// for a source available on an FTP server. The URL can also start with cdrom: for CD-ROM/DVD-ROM/Blu-ray disc based installations, although this is less frequent, since network-based installation methods are more and more common.

The syntax of the last field depends on the structure of the...

0 0
0 0

This seems stupid to me, but I have a thing against IPv6... At any rate, if apt-get seems to get stuck trying to connect to a repository and it is showing an IPv6 address for the address of the remote repository then you can add the following option to your command to make it stop doing this. This will force IPv4:

apt-get -o Acquire::ForceIPv4=true update aptitude -o Acquire::ForceIPv4=true

Apt installs stuck in queue

Having packages left in the queue can cause problems for the next admin to use the system. They might not notice the actions already in the queue and may inadvertently trigger them. This can have devastating consequences to the system. See Aptitude_safety_precautions for more information.

The first command will show a list of any packages in the queue waiting to be installed. The second command will clear everything from the queue.

aptitude -ysfD install aptitude keep-all

Get a list of all packages last installed

0 0

The Advanced Package Tool, or APT, is a free software user interface that works with core libraries to handle the installation and removal of software on the Debian, Slackware and other Linux distributions.[3] APT simplifies the process of managing software on Unix-like computer systems by automating the retrieval, configuration and installation of software packages, either from precompiled files or by compiling source code.[3]

APT was originally designed as a front-end for dpkg to work with Debian's .deb packages, but it has since been modified to also work with the RPM Package Manager system via APT-RPM.[4] The Fink project has ported APT to Mac OS X for some of its own package management tasks,[5] and APT is also available in OpenSolaris.

There has been an apt program since version 1.0; apt is a collection of tools distributed in a package named apt. A significant part of apt is defined in a C++ library of functions; apt also includes command-line programs for...

0 0
apt-get Man Page | Bash | SS64.com

Search for and install software packages (Debian/Ubuntu).

Syntax apt-get [-sqdyfmubV] [-o= config_string ] [-c= config_file ] [-t= target] update apt-get [-sqdyfmubV] [-o= config_string ] [-c= config_file ] [-t= target] upgrade apt-get [-sqdyfmubV] [-o= config_string ] [-c= config_file ] [-t= target] dselect-upgrade apt-get [-sqdyfmubV] [-o= config_string ] [-c= config_file ] [-t= target] dist-upgrade apt-get [-sqdyfmubV] [-o= config_string ] [-c= config_file ] [-t= target] install pkg [ { =pkg_version_number | /target_release_name | /target_release_codename } ] ... apt-get [-sqdyfmubV] [-o= config_string ] [-c= config_file ] [-t= target] remove pkg... apt-get [-sqdyfmubV] [-o= config_string ] [-c= config_file ] [-t= target] purge pkg... apt-get [-sqdyfmubV] [-o= config_string ] [-c= config_file ] [-t= target] source pkg [ { =pkg_version_number | /target_release_name |...
0 0

APT (the Advanced Packaging Tool) is an evolution of the Debian .deb software packaging system. It is a rapid, practical, and efficient way to install packages on your system. Dependencies are managed automatically, configuration files are maintained, and upgrades and downgrades are handled carefully to ensure system stability.


resynchronizes the local index of packages files, updating information about new and updated packages that are available. The indexes are fetched from the location(s) specified in /etc/apt/sources.list.

An update should always be performed before an upgrade or dist-upgrade.


installs the newest versions of all packages currently installed on the system, using the sources in /etc/apt/sources.list. If a package is currently installed and a new version is available, it is retrieved and upgraded. Under no circumstances are installed packages removed, or packages not already installed retrieved. New versions of...

0 0

Ubuntu is incredibly hostile to authenticating proxies. I use an Ubuntu laptop at work and the number of breakages is incredible.

Synaptic, Apt, Firefox, Chromium, etc all use different methods for specifying a proxy and there's nowhere to specify credentials securely.

Some bugs on the subject : https://bugs.edge.launchpad.net/ubuntu/+source/msttcorefonts/+bug/220070




Oli's suggestion to use an export is the only vaguely secure way to do it. It's also sometimes possible to "fudge" proxy support if the proxy server is using secondary authentication to minimise load on the main authentication servers (say perhaps Active Directory). This is where the first proxy connection is authenticated by the proxy against AD, then for a set time period...

0 0


apt-get - APT package handling utility - command-line interface


apt-get [options] [-o config=string] [-c=cfgfile] command [pkg]



is the command-line tool for handling packages, and may be considered the user's "back-end" to other tools using the APT library. Several "front-end" interfaces exist, such as synaptic and aptitude.


Unless the


, or


option is given, one of the commands below must be present.

update Used to re-synchronize the package index files from their sources. The indexes of available packages are fetched from the location(s) specified in /etc/apt/sources.list(5). An update should always be performed before an upgrade or dist-upgrade. upgrade Used to install the newest versions of all packages currently installed on the system from the sources enumerated in /etc/apt/sources.list(5). Packages currently installed with new versions available are...
0 0

Installing, updating, and removing (when needed) installed programs are key responsibilities in a system administrator’s daily life. When a machine is connected to the Internet, these tasks can be easily performed using a package management system such as aptitude (or apt-get), yum, or zypper, depending on your chosen distribution, as explained in Part 9 – Linux Package Management of the LFCE (Linux Foundation Certified Engineer) series. You can also download standalone .deb or .rpm files and install them with dpkg or rpm, respectively.

Linux Foundation Certified Engineer – Part 11

Introducing The Linux Foundation Certification Program

However, when a machine does not have access to the world wide web, another methods are necessary. Why would anyone want to do that? The reasons range from saving Internet bandwidth (thus avoiding several concurrent connections to the outside) to securing packages compiled from source locally, and including the possibility of providing...

0 0

In my experience on Ubuntu 12.04 LTS, using the command below will not upgrade the package if using a separate PPA -

sudo apt-get --only-upgrade install

Similarily, I did not want to run the upgrade command, which would upgrade all packages on my server -

sudo apt-get dist-upgrade

For example, I have PHP 5.3 installed and have added the ondrej PPA to my apt.sources using -

sudo add-apt-repository ppa:ondrej/php5

If I run

sudo apt-get install php5

it will just reinstall PHP 5.3.

I have to, first, determine the version number to upgrade to, using

sudo apt-cache policy php5

This will list all available version numbers. You should find the version number you want to upgrade to, and then copy the whole string that references it. For example, the string for PHP 5.5 on Ubuntu is "5.5.16+dfsg-1+deb.sury.org~precise+2".

Now, you can run the apt-get install command with the specific version number, and voila!

sudo apt-get install...
0 0

I’ve compiled a small list of things that I always perform after installing a fresh copy of Kali Linux in this post. Because I got multiple laptops and workstations, I’ve tried to generalize the following instructions to suit everyone’s(including mine??) requirements. This is my top list of 20 things to do after installing Kali Linux. Your requirement’s might be completely different. If you have a suggestion, let me know via comments section. You can comment without registering.. so that’s an easy way to give me feedback and opinion.

WARNING: Following guide was written and tested for Kali Linux 1.x. I am working best to write a guide on Kali Linux 2.0 – Kali Sana. Use this guide at your own risk for Kali Linux 2.0 – Kali Sana.

Standard Packages:

Standard packages contains anything and everything I found useful. This list if divided into 3 parts:

Kali Linux is a special build from Debian. Kali Linux inherits a lot of the issues from Debian...

0 0

This page contains instructions to download and install the latest release of SaltStack.

Bootstrap works across many platforms and is the easiest way to get started. If you cannot use Bootstrap or if you prefer packages, click the tab for your platform.

Bootstrap - Multi-Platform

Salt Bootstrap is a shell script that detects the target platform and selects the best installation method. (Supported Platforms)

On the Salt master

Run these commands on the system that you want to use as the central management point.

curl -L https://bootstrap.saltstack.com -o install_salt.sh sudo sh install_salt.sh -P -M

Your Salt master can manage itself, so a Salt minion is installed along with the Salt master. If you do not want to install the minion, also pass the -N option.

On each Salt minion

Run these commands on each system that you want to manage using Salt.

curl -L https://bootstrap.saltstack.com -o install_salt.sh sudo sh...
0 0