Two JOSM Applications Loaded How to Delete Them

I have another question and not sure how to work this out. I use JOSM for open source mapping fun. I somehow installed two JOSM programs on my Linux Mate. How can I delete both them and then install the latest version?

I tried to type into the Terminal sudo apt uninstall JOSM but it did not work at all. Both are still on the computer.

What should I do?

Jason

1 Like

sudo apt remove josm or sudo apt purge josm

2 Likes

Step 1: Verify which packages installed JOSM
          (if from different sources)

sudo dpkg-query -S josm | grep 'josm$'

You will get a list that looks like this:

automake: /usr/share/lintian/overrides/automake
bash-completion: /usr/share/bash-completion/completions/automake
automake: /usr/share/doc/automake

The package names listed at the start of the line report which package installed which PATH command.



Step 2: List all installed versions of JOSM
          (if different versions)

sudo dpkg-query --show josm

which gives you a report like this

automake	1:1.16.5-1.3

OR

sudo dpkg --list | awk -v p="josm" '{ if( $2 == p ){ print $0 } ; }'

which gives you a report like this

ii  automake                                          1:1.16.5-1.3                                all          Tool for generating GNU Standards-compliant Makefiles


Step 3: Remove multiple versions
          (or specific version, leaving other versions behind)


One important proviso ...

If multiple versions of the same command name, the installations might share a subset of files, if both installed in the same application root directory.

IF THAT IS THE CASE, you need to remove ALL versions, then re-install only the desired version.

NOTE: Save any configuration files in a designated location, before performing the following.

sudo apt purge josm=${version1}

sudo apt purge josm=${version2}

where version1/version2 is the version(s) reported for JOSM, similar to the above reported "1:1.16.5-1.3".

:slight_smile:

2 Likes

Thank you @ericmarceau ! I followed the best I could your instructions and it worked. I was able to get into the App Center to delete one and the other I was able to figure out what you said and follow it. I am very new to Linux and Linux Mate. My brother got me working with Mate. This is first time I am really playing around with Linux and he recommended Mate to start out.

2 Likes

I tried those two lines after a Google search about the line I mentioned and found them. They did not work but I figured it out. Thank you for the help! I did write those down. I am writing down useful command lines I will use often and what they do. These two are added.

1 Like

A success ... in overcoming that first challenging mystery ... is the best way to start your (lifelong?) journey of discovery from exploring the vast Linux ecosystem!

Strap in for the roller-coaster ride ... and experience the joy/high only that kind of ride brings!

Discipline is the key: observe, reflect, hypothesize, research, pause, reflect, plan, probe, test, do!

:slight_smile:

2 Likes