1

I am running Ubuntu 14.04 and have pgadmin3 version 1.18.1, PostgreSQL 9.4 installed. I am new to pgadmin3.

I want to upgrade to pgadmin3 1.20.0.

So I used

sudo apt-get update sudo apt-get install pgadmin3

Then I had 2 different versions [1.18.q and 1.20.0] of pgadmin3 installed on my machine. So I tried to remove pgadmin3 using these commands seperately,

sudo apt-get remove pgadmin3 sudo apt-get remove --auto-remove pgadmin3

also tried,

sudo apt-get purge pgadmin3 sudo apt-get purge --auto-remove pgadmin3

but this removed the 1.20.0 version and not 1.18.1.

I tried removing the 1.18.1 version by using the same commands then it says that the pgadmin3 is not installed.

What should I do to have pgadmin3 version 1.20.0 installed on my machine? I want to remove version 1.18.1-2.

This is the link to the snapshot which shows that I have 2 versions installed

When I do,

apt-cache show pgadmin3 | grep Version:

it shows,

Version: 1.20.0-3.pgdg14.04+1 Version: 1.20.0-3.pgdg12.4+1 Version: 1.18.1-2

EDIT

Output of,

apt-cache policy pgadmin3

is:

pgadmin3:
  Installed: 1.20.0-3.pgdg14.04+1
  Candidate: 1.20.0-3.pgdg14.04+1
  Version table:
 *** 1.20.0-3.pgdg14.04+1 0
        500 http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg/main amd64 Packages
        100 /var/lib/dpkg/status
     1.20.0-3.pgdg12.4+1 0
        500 http://apt.postgresql.org/pub/repos/apt/ precise-pgdg/main amd64 Packages
     1.18.1-2 0
        500 http://in.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages

The output of command,

grep -r 'pgadmin3' /usr/share/applications

is

/usr/share/applications/pg-doc-pgadmin-9_3.desktop:Exec="/opt/PostgreSQL/9.3/scripts/launchbrowser.sh" file:///opt/PostgreSQL/9.3/pgAdmin3/share/pgadmin3/docs/en_US/index.html
/usr/share/applications/pgadmin3.desktop:Exec=pgadmin3
/usr/share/applications/pgadmin3.desktop:Icon=pgadmin3
/usr/share/applications/bamf-2.index:pg-doc-pgadmin-9_3.desktop "/opt/PostgreSQL/9.3/scripts/launchbrowser.sh" file:///opt/PostgreSQL/9.3/pgAdmin3/share/pgadmin3/docs/en_US/index.html         false
/usr/share/applications/bamf-2.index:pgadmin3.desktop   pgadmin3            false

AND For:

# grep -r 'pgadmin3' ~/.local/share/applications

Output is:

grep: /root/.local/share/applications: No such file or directory

For:

# command -v pgadmin3

it shows:

/usr/bin/pgadmin3

12
  • Edit your question and add the output of apt-cache policy pgadmin3
    – A.B.
    Nov 24, 2015 at 10:32
  • And the output of grep -r 'pgadmin3' /usr/share/applications; grep -r 'pgadmin3' ~/.local/share/applications; command -v pgadmin3
    – A.B.
    Nov 24, 2015 at 10:35
  • also this please grep -r 'pgadmin3' ~/.local/share/applications; command -v pgadmin3
    – A.B.
    Nov 24, 2015 at 10:43
  • Run grep -r 'pgadmin3' ~/.local/share/applications as regular user and not as root user.
    – A.B.
    Nov 24, 2015 at 11:04
  • for a regular user , there is no output
    – VivekS
    Nov 24, 2015 at 11:08

1 Answer 1

-1

pgadmin version 1.20 is currently installed on your system.

I don't think you've ever had both 1.18 and 1.20 of pgadmin3 installed at the same time. The icons on the desktop have little relation to the actual installed versions of the applications.

In the case of the pgadmin3 package, the Debian APT package management system prevents you from having more than one version installed at the same time.

When you install an application for which multiple versions are available, look at the output of apt-get install to see the installed version number.

The output of your apt-cache show pgadmin3 output shows that you have 3 versions of pgadmin3 available for installation:

$ apt-cache show pgadmin3 | grep Version:
Version: 1.20.0-3.pgdg14.04+1
Version: 1.20.0-3.pgdg12.4+1
Version: 1.18.1-2
$

(The version 1.20.0-3.pgdg12.4+1 is for Ubuntu Precise 12.4. You should probably remove precise-pgdg from your software sources.)

I hope the following sections help you understand the steps you've been through and what was actually happening:

Default Trusty pgadmin Installation

This is on Trusty 14.04 with pgadmin3 1.18.1-2 installed. Neither trusty-pgdg or precise-pgdg appear in the software sources.

$ apt-cache policy pgadmin3
pgadmin3:
  Installed: 1.18.1-2
  Candidate: 1.18.1-2
  Version table:
 *** 1.18.1-2 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
       100 /var/lib/dpkg/status
$

Show installed versions of pgadmin3:

$ dpkg-query -W pgadmin3
pgadmin3        1.18.1-2
$  

Invoke pgadmin3 -v to show the executable version:

$ pgadmin3 -v
pgAdmin III 1.18.1
$

Adding the trusty-pgdg repo (contains newer pgadmin3)

Now I've created a file /etc/apt/sources.list.d/postgresql.list containing the line:

deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main

And then run sudo apt-get update. Looking at the apt-cache policy we see now a new version (1.20.0-3.pgdg14.04+1) from the trusty-pgdg repo. Note the line "Candidate:" which shows which version is the best candidate to be installed:

$ apt-cache policy pgadmin3
pgadmin3:
  Installed: 1.18.1-2
  Candidate: 1.20.0-3.pgdg14.04+1
  Version table:
     1.20.0-3.pgdg14.04+1 0
        500 http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg/main amd64 Packages
 *** 1.18.1-2 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
        100 /var/lib/dpkg/status
$

NOTE: Because there is a new "Candidate", either apt-get dist-upgrade or apt-get install pgadmin3 will install the new version of pgadmin3.

Install pgadmin3 again to get the most recent version from new repo

Now install pgadmin3 again, to get version 1.20 (we already have trusty-pgdg in our software sources list). apt-get install by default attempts to install the latest version, shown by the line "Candidate:" in the policy above:

$ sudo apt-get install pgadmin3
[ . . . ]
Preparing to unpack .../pgadmin3_1.20.0-3.pgdg14.04+1_amd64.deb ...
Unpacking pgadmin3 (1.20.0-3.pgdg14.04+1) over (1.18.1-2) ...
Preparing to unpack .../pgadmin3-data_1.20.0-3.pgdg14.04+1_all.deb ...
Unpacking pgadmin3-data (1.20.0-3.pgdg14.04+1) over (1.18.1-2) ...
[ . . . ]
Setting up pgadmin3-data (1.20.0-3.pgdg14.04+1) ...
Setting up pgadmin3 (1.20.0-3.pgdg14.04+1) ...
[ . . . ]
$

And verify the installed version:

$ dpkg-query -W pgadmin3
pgadmin3        1.20.0-3.pgdg14.04+1
$

$ pgadmin3 -v
pgAdmin III 1.20.0
$

Also shown by apt-cache policy:

$ apt-cache policy pgadmin3
pgadmin3:
  Installed: 1.20.0-3.pgdg14.04+1
  Candidate: 1.20.0-3.pgdg14.04+1
  Version table:
 *** 1.20.0-3.pgdg14.04+1 0
        500 http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg/main amd64 Packages
        100 /var/lib/dpkg/status
     1.18.1-2 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
$

If you try to install again, no action will be taken:

$ sudo apt-get install pgadmin3
Reading package lists... Done
Building dependency tree       
Reading state information... Done
pgadmin3 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$
3
  • Hello, I have added the snapshot which shows both the versions. When I open both, the version numbers are shown 1.18.1 and 1.20.0
    – VivekS
    Nov 24, 2015 at 7:04
  • A screen shot of icons doesn't tell anything about the versions. You need to know the versions from the package management system. Please run this command and put the output in your question: apt-cache show pgadmin3 | grep Version:
    – RobertL
    Nov 24, 2015 at 7:26
  • This is the output of the command, apt-cache show pgadmin3 | grep Version: Version: 1.20.0-3.pgdg14.04+1 Version: 1.20.0-3.pgdg12.4+1 Version: 1.18.1-2
    – VivekS
    Nov 24, 2015 at 8:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .