InfoHeap
Tech
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

Ubuntu tutorials

  • How to add a user on Linux with sudo access
  • How to check if a user has password on Linux
  • How to install ViewVC for svn repository on Ubuntu Linux
  • How to setup ssl (https) for your site on Ubuntu Linux
  • Install rabbitmq on Ubuntu Linux
  • LXC (Linux Containers) - quick start tutorial on Ubuntu
  • Linux - command to check swap size
  • Linux - how to add a user using useradd
  • Linux - how to create a large file like 1GB
  • Linux - how to create swap partition
  • Linux - how to remove user from a group
  • Linux - number of cpus (lscpu)
  • Linux du - find disk usage of directories or files
  • NFS client and server handy commands
  • Setup svn repository on AWS Ubuntu with apache auth
  • Ubuntu - check if a service is upstart based
  • Ubuntu - dpkg and apt-get beginner tutorial
  • Ubuntu - find file to package
  • Ubuntu - find where will a package be installed from
  • Ubuntu - how to auto start services on boot using update-rc.d (sysv init)
  • Ubuntu - how to find boot autostart status of a service
  • Ubuntu - reload iptables rules during boot
  • Use x2go to access remote Ubuntu Linux
 
  • Home
  • > Tutorials
  • > Ubuntu Linux

Ubuntu – find where will a package be installed from

on Feb 7, 2016

Ubuntu apt-cache policy can be used to find the sources of a package and their order. This can be helpful in case we are downloading/installing a package from a custom repository. Here are some examples on Ubuntu Linux.

To check where will docker-engine be installed from:

$ apt-cache policy docker-engine
docker-engine:
  Installed: 1.9.1-0~trusty
  Candidate: 1.10.0-0~trusty
  Version table:
     1.10.0-0~trusty 0
        500 https://apt.dockerproject.org/repo/ ubuntu-trusty/main amd64 Packages
 *** 1.9.1-0~trusty 0
        500 https://apt.dockerproject.org/repo/ ubuntu-trusty/main amd64 Packages
        100 /var/lib/dpkg/status
     1.9.0-0~trusty 0
        500 https://apt.dockerproject.org/repo/ ubuntu-trusty/main amd64 Packages
...
...


To check where will nodejs be installed from:

$ apt-cache policy nodejs
nodejs:
  Installed: 5.3.0-1nodesource1~trusty1
  Candidate: 5.5.0-1nodesource1~trusty1
  Version table:
     5.5.0-1nodesource1~trusty1 0
        500 https://deb.nodesource.com/node_5.x/ trusty/main amd64 Packages
 *** 5.3.0-1nodesource1~trusty1 0
        100 /var/lib/dpkg/status
     0.10.25~dfsg2-2ubuntu1 0
        500 http://us-west-1.ec2.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages

Note that here nodejs is getting installed from https://deb.nodesource.com/node_5.x/ instead of ubuntu default location.

Suggested posts:

  1. Mac brew – how to find latest available package without installing
  2. LXC (Linux Containers) – quick start tutorial on Ubuntu
  3. WordPress – query to dump all categories
  4. PHP echo – comma (,) vs dot (.) performance benchmarks
  5. jQuery toggleClass() examples
  6. How to install and monitor memcache for php on Ubuntu Linux
  7. Docker managing images – command line cheat sheet
  8. document querySelector examples
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged Tutorials, Ubuntu Linux
  • Browse content
  • Article Topics
  • Article archives
  • Contact Us
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | Company results | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries | InfoHeap Money

Copyright © 2025 InfoHeap.

Powered by WordPress