How To Uninstall Old Version In Linux

Debian 10 and Xfce 4.12.

I have been upgrading as new versions came out, and usually was able to delete the old directory for the last install, and the old items would be gone. With 7.2, I have multiple versions installed; 7.0, 7.1 and 7.2 (according to my menu). How do I know that I only have 7.2 installed and can just delete the menu items?

Did you download (and install) packages from instead of using a distribution repository (or PPA)? Please provide output from ls -l /opt

… just deleting software directory of installed apps messes up your paket manager’s database. You need to use the proper uninstall method, which in case of Debian would be apt purge ....

Try to start the older versions and check the actual version of the started program (entry in help-menu)

Maybe only the starter in your desktop-environment was not deleted and replaced by the newer one.
You may also check in xfce to wich path your starters point. If it is the same path it is safe to remove the starter (not the software).

Sorry if I was not clear. Yes, I actually have multiple versions installed. I know because starting each on shows the version number of it.

I downloaded from because Debian has no maintainer for libreoffice.

When the downloaded file is unarchived, it creates a temporary install directory arrangement with a DEBS subdirectory from which to install. Those directories are what I delete after install.

ls -l /opt
total 60
drwxrwxr-x 4 root root 4096 Jun 25 2019 ivideon
drwxr-xr-x 3 root root 4096 Jul 14 2020 libreoffice6.3
drwxr-xr-x 3 root root 4096 Jul 14 2020 libreoffice6.4
drwxr-xr-x 7 root root 4096 Jan 24 2021 libreoffice7.0
drwxr-xr-x 7 root root 4096 Jun 28 17:32 libreoffice7.1
drwxr-xr-x 7 root root 4096 Aug 26 16:23 libreoffice7.2
drwxr-xr-x 6 root root 4096 May 28 14:54 master-pdf-editor-5
drwxr-xr-x 9 root root 4096 Jan 12 2020 pdfstudio2019
drwxr-xr-x 4 root root 4096 Aug 25 2020 teamviewer
drwxr-xr-x 3 root root 4096 Mar 22 11:19 trueconf
drwxrwxr-x 20 root root 20480 Oct 23 2020 zoom


to get rid of the old instances you need to execute:

dpkg --list | awk '/ii/&&/libreoffice6.3/||/libobasis6.3/{print $2}' | sudo xargs apt purge --yes

dpkg --list | awk '/ii/&&/libreoffice6.4/||/libobasis6.4/{print $2}' | sudo xargs apt purge --yes

dpkg --list | awk '/ii/&&/libreoffice7.0/||/libobasis7.0/{print $2}' | sudo xargs apt purge --yes

dpkg --list | awk '/ii/&&/libreoffice7.1/||/libobasis7.1/{print $2}' | sudo xargs apt purge --yes

Hope that helps.

That did the trick. Thank you very much.

By the way, one needs to log out of the Xfce desktop and log back in for the menu items to be removed.