How to remove a package when don't know how it was installed?

I searched an answer to this question: How to uninstall a package that is not tracked by pacman. Probably an incorrectly installed package. But despite studying a lot of posts on various forums could not figure out how to solve it exactly.

So there is the following package called calibre which is not recognized by pacman:

pacman -Q --info calibre
error: package 'calibre' was not found
pacman -Ss calibre
extra/calibre 7.8.0-2
    Ebook management application

Since I don’t remember how it was installed, it seems the only way to remove it would be delete it manually?

Is it possible to remove it from the system by running a command that deletes all files and folders that contain the string “calibre”, then use pacman to delete resulting orphan packages?

For example using the command:

rm *\calibre*

we can delete the package calibre, right? Is this ok?

Is it possible you followed the instructions on the download page to install?

If so, uninstall instructions are documented there as well:

You can uninstall calibre by running sudo calibre-uninstall. Alternately, simply deleting the installation folder will remove 99% of the installed files.


Frankly, I don’t remember, but it is possible.

However, the command ‘calibre-uninstall’ does not work:

sudo calibre-uninstall
sudo: calibre-uninstall: command not found

What is installation folder? Is it the folder located in /home/user/ folder? There are two folders named

calibre-bin (428 Mb)
Calibre Library (13 Mb)

So, calibre-bin is the installation folder, right?

It is quite likely that you ran an isolation install. As in you installed calibre by running this command:

wget -nv -O- | sh /dev/stdin install_dir=~/calibre-bin isolated=y

Yes. An isolated install is a self-contained installation, which means every binary and library file required for calibre to run is packaged inside that directory.

This directory is simply to store files related to your calibre library (all your books will be kept inside this directory).

1 Like

Never do that, whatever it is…

P.S. Seriously, it’s great that you’ve decided to ask here first :laughing:


You can find out if you installed calibre “normally” with command

pacman -Qs calibre

If you find the package this way, removing is simple:

sudo pacman -Rs "name-of-the-calibre-package"

But if you installed it without the normal tools, then you need other measures.

1 Like

There is no correct way to globally remove a package that wasn’t installed with pacman. You have to use the method you installed it with to remove it if possible. If not then other methods of removing it such as removing the directory that it resides in.

1 Like

So, after deleting the calibre-bin folder in home/user/ directory I ran

pacman -Qtdq

and it returned no orphans. But it seems there should be a lot of extra packages tied to calibre, that wre installed because calibre depended on them? How to remove them now?

Maybe not. If you removed the folders containing the calibre-bin and calibre library i don’t think i would be that concerned about some left over files. If you don’t know where they reside and the computer is functioning properly then i don’t see a reason to be worried. :man_shrugging:

1 Like

There seems to be some kind of misunderstanding here. Why would you run this command to check for leftovers when you never installed calibre with pacman to begin with?

Like I mentioned earlier, if you did an isolated installation (see the comment above), the installer script will just jam everything (binary executables and the required .so files inside the calibre-bin directory. Once you’ve deleted that directory, the calibre package is gone, and that’s it.


Thanks everyone for help.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.