Can't use calibre

I was wondering about why it is installed too.

I think I installed youtube-dl from pip as a habit from windows as I installed it like that, other than that I can’t remember installing them, maybe I installed it as a dependency for something else. I had no idea using pip can be replaced with pacman.

I want to reinstall calibre form arch repo but I want to make sure uninstalling lxml form pip is not going to break anything.

It is most likely installed as a dependency of other pip packages you installed.

I really don’t think that installing packages with third party package managers without the use of a virtual environment is a good idea. It will lead to problems eventually.

How I can do that? I am trying my best to stick to pacman too. But don’t know anything about virtual environment. Can you elaborate more on it?

To be honest, if I were in your position, I would do a clean reinstall and then set everything up from scratch, this time sticking to official repos/AUR only. If I have the time, I would not even hesitate. I personally can’t stand a messy system. :rofl:

Here’s a good article to help you understand virtual environments.

This post is also helpful if you are beginner. I posted it when I first started using arch-based distros.

I don’t like messy system too. I may do that in the future. but For now I think at least I need to learn more to know how to create a clean system and then migrate to that. I had tried Linux Mint on my old laptop just to learn these kinds of stuff, and it helped for sure, but I guess nothing can replace learning in action.

Thanks , learning anything related to this topics surely helps.


Go through each comment in that post and read through the links. Trust me, you will learn a lot just by reading alone.

Using an arch-based distro is different though. It takes skill and precaution to use it well. There are certain practices that are encouraged. Most issues are caused by partial updates. There are a few links in that post that teaches how to update and maintain your system the right way. Pay special attention to that.

1 Like

I should will read it carefully.

How should I uninstall packages btw? You said pacman -Rns is not there danger of removing other packages we use with this? I have read different opinions on that , I thought maybe the best practice would be to uninstall the package itself and then periodically remove only orphaned packages I have not explicitly installed.(not sure how to get that). What do you recommend for that?


Uninstalling packages with pacman -Rns is fine. The -n option basically instructs pacman to not create a bunch of .pacsave file every time you remove a package. The -s option instructs pacman to remove packages recursively. Meaning:

Let’s say package foo depends on foobar1, foobar2 and foobar3.

The command pacman -Rs foo will remove foo along with foobar1, foobar2, and foobar3 if and only if foobar1, foobar2, and foobar3 are not required by other packages. Pacman knows how to manage all this because it stores a database file .db file for each repo locally. These files contain all the information pacman needs in order to manage package dependencies. If you are curious, you can cd into the /var/lib/pacman/sync/ directory and verify that there are 5 .db files in that directory. If you are running endeavouros, the .db files correspond to each repo. The four official Arch repos (community.db, core.db, extra.db, multilib.db) and endeavouros’s own repo (endeavouros.db).

Each of these .db files has a timestamp that pacman will use to determine whether any updates are necessary. Every time you run pacman’s Sync operation (the -S flag) and the -y option, pacman will compare the timestamps of the databases stored on your local machine with those stored in pacman’s mirrors. If the timestamp of the .db files in the mirrors are newer than the ones stored locally, pacman will download the latest copy and replace the local database with the latest copy, while listing out all the packages that need to be updated. This is possible because pacman will compare the new database with all the packages installed on your system (found in /var/lib/pacman/local/). Only when all the required updates are installed will the local packages and the databases files be in sync.

That is why it is crucial to use pacman -Syu instead of pacman -Sy. If you do that latter without running pacman -Su subsequently, your databases are refreshed to the latest ones in the mirror, but your local packages are never updated. The local packages are out of sync with the databases.

1 Like

Thanks, How I can get rid of orphan packages , Like I uninstalled some packages with only -R and they should have dependencies left over in system, of course I don’t want to remove any packages I have installed directly and used by other packages.

To obtain a list of orphans, you can run pacman -Qdtq. To remove it, you can do this:

sudo pacman -Rns $(pacman -Qdtq)

1 Like

Is there a dry run option? sorry but the man page for it is not the best one I know of.

Not that I know of. But the command sudo pacman -Rns $(pacman -Qdtq) should not be difficult to understand if you are familiar with the linux terminal.

The $() is command substitution, so if your pacman -Qdtq returns a list of orphans like so:


The command sudo pacman -Rns $(pacman -Qdtq) is equivalent to sudo pacman -Rns package_A package_B package_C

1 Like

Yeah I understand bash (basics of it at least) and this one is very simple. I just don’t understand flags for pacman as their are do different things based on the main flag they placed after. I like to see for example how much space get freed if I run that and stuff like that.

I advise everyone to consider if they really want this option or not. It only stops .pacsave files from being created for files that are in a packages backup array and that you have modified. Most packages don’t even have anything in the backup array and the ones that do are usually important config files which are very small in size.

In other words, be sure you that you want to not create a backup of important config files that you modified.

It also has the side-effect of sometimes removing optional dependencies of other packages so be careful whenever you use -s to carefully read the package list.

Be careful to read the whole list before accepting the removal, orphaned packages are not always packages you don’t need. Also, if you use -Rns to remove orphans read the note above about optional dependencies of other packages potentially being removed.


Config file like i home directory or in etc folder?

How I can filter them to see if any of them is an optional dependency of another package? Is there a command for that?

The -n option will not touch anything inside the .config directory. It applies to files that are listed in the backup array of the package’s PKGBUILD and the ones (inside the /etc/) that the users have modified.

You can get a list of these files with this command: sudo pacman -Qii | awk '/^MODIFIED/ {print $2}'

1 Like