Issue
I installed LibreOffice on a server with a shell script using the following
sudo -S dpkg -r LibreOffice_5.1.1.3_Linux_x86-64_deb/DEBS/*.deb
Now I would like to change to a different version and am attempting to uninstall the previous version by using:
sudo -S dpkg -i LibreOffice_5.0.6.3_Linux_x86-64_deb/DEBS/*.deb
which yields the error
dpkg: error: you must specify packages by their own names, not by quoting the names of the files they come in
After doing some research I found this thread and it seems I will need to call the dpkg
with the name of the actual debian files, but doing dpkg -r libreoffice
results in the error
dpkg: warning: ignoring request to remove libreoffice which isn't installed
I have also tried using sudo apt-get remove libreoffice-core
, which does not seem to be successful. Is there an automated way to remove all of the installed .deb files so that I can safely install the new version?
For reference the following files are shown in the DEBS
folder
libobasis5.1-base_5.1.1.3-3_amd64.deb
libobasis5.1-filter-data_5.1.1.3-3_amd64.deb
libobasis5.1-xsltfilter_5.1.1.3-3_amd64.deb libobasis5.1-calc_5.1.1.3-3_amd64.deb
libobasis5.1-gnome-integration_5.1.1.3-3_amd64.deb
libreoffice5.1_5.1.1.3-3_amd64.deb libobasis5.1-core_5.1.1.3-3_amd64.deb
libobasis5.1-graphicfilter_5.1.1.3-3_amd64.deb
libreoffice5.1-base_5.1.1.3-3_amd64.deb libobasis5.1-draw_5.1.1.3-3_amd64.deb
libobasis5.1-images_5.1.1.3-3_amd64.deb
libreoffice5.1-calc_5.1.1.3-3_amd64.deb libobasis5.1-en-us_5.1.1.3-3_amd64.deb
libobasis5.1-impress_5.1.1.3-3_amd64.deb
libreoffice5.1-debian-menus_5.1.1-3_all.deb libobasis5.1-en-us-base_5.1.1.3-3_amd64.deb
libobasis5.1-kde-integration_5.1.1.3-3_amd64.deb
libreoffice5.1-dict-en_5.1.1.3-3_amd64.deb libobasis5.1-en-us-calc_5.1.1.3-3_amd64.deb
libobasis5.1-librelogo_5.1.1.3-3_amd64.deb
libreoffice5.1-dict-es_5.1.1.3-3_amd64.deb libobasis5.1-en-us-math_5.1.1.3-3_amd64.deb
libobasis5.1-math_5.1.1.3-3_amd64.deb
libreoffice5.1-dict-fr_5.1.1.3-3_amd64.deb libobasis5.1-en-us-res_5.1.1.3-3_amd64.deb
libobasis5.1-ogltrans_5.1.1.3-3_amd64.deb
libreoffice5.1-draw_5.1.1.3-3_amd64.deb libobasis5.1-en-us-writer_5.1.1.3-3_amd64.deb
libobasis5.1-onlineupdate_5.1.1.3-3_amd64.deb
libreoffice5.1-en-us_5.1.1.3-3_amd64.deb libobasis5.1-extension-beanshell-script-provider_5.1.1.3-3_amd64.deb
libobasis5.1-ooofonts_5.1.1.3-3_amd64.deb
libreoffice5.1-impress_5.1.1.3-3_amd64.deb libobasis5.1-extension-javascript-script-provider_5.1.1.3-3_amd64.deb
libobasis5.1-ooolinguistic_5.1.1.3-3_amd64.deb
libreoffice5.1-math_5.1.1.3-3_amd64.deb libobasis5.1-extension-mediawiki-publisher_5.1.1.3-3_amd64.deb
libobasis5.1-postgresql-sdbc_5.1.1.3-3_amd64.deb
libreoffice5.1-ure_5.1.1.3-3_amd64.deb libobasis5.1-extension-nlpsolver_5.1.1.3-3_amd64.deb
libobasis5.1-python-script-provider_5.1.1.3-3_amd64.deb
libreoffice5.1-writer_5.1.1.3-3_amd64.deb libobasis5.1-extension-pdf-import_5.1.1.3-3_amd64.deb
libobasis5.1-pyuno_5.1.1.3-3_amd64.deb libobasis5.1-extension-report-builder_5.1.1.3-3_amd64.deb
libobasis5.1-writer_5.1.1.3-3_amd64.deb
Solution
Use dpkg-query -l
to get a list of installed packages. You can also search the list with dpkg-query -l 'libre*'
for everything beginning with 'libre'.
You can then use the displayed package name to remove or purge them with dpkg.
Using dpkg --remove PackageNameHere
will let configuration files untouched and delete only the binaries.
With dpkg --purge AgainYourPackageNameHere
you would delete everything regarding the package.
Answered By - Oxados