Last active
March 6, 2026 05:16
-
-
Save dungsaga/b3f5cfff39a7124652e5f1f996814b66 to your computer and use it in GitHub Desktop.
install and uninstall LibreOffice packages (under Debian/Ubuntu/...)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # INSTALLATION: | |
| tar xf --strip-components=1 LibreOffice_26.2.0_Linux_x86-64_deb.tar.gz | |
| sudo dpkg -i DEBS/*.deb | |
| # UNINSTALLATION: | |
| tar xf --strip-components=1 LibreOffice_26.2.0_Linux_x86-64_deb.tar.gz | |
| cd DEBS | |
| for f in DEBS/*.deb; do sudo dpkg -r --force-depends "${f/_*/}"; done | |
| # alternative methods of UNINSTALLATION | |
| pkgs=$(tar tf LibreOffice_26.2.0_Linux_x86-64_deb.tar.gz | grep '\.deb$' | sed -E 's#.+/DEBS/([^_]+)_.+#\1#') | |
| pkgs=$(tar tf LibreOffice_26.2.0_Linux_x86-64_deb.tar.gz | grep -oP '(?<=/DEBS/)[^_]+') | |
| pkgs=$(dpkg --get-selections | grep -oP '(libobasis26|libreoffice26)\S+') | |
| for p in $pkgs; do sudo dpkg -r --force-depends "$p"; done | |
| # NOTE: replace "26.2.0" with your LibreOffice version number |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment