Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
2
votes
1
answers
457
views
how do I fix apt-file? - not working and added extra repos
I was looking for a way to find the contents of an apt package and I found a post that advised to use apt-file. I installed using: sudo apt install apt-file sudo apt-file update This update took ages and some of the packages are quite large. Now even when I use `sudo apt update` there seems to be ad...
I was looking for a way to find the contents of an apt package and I found a post that advised to use apt-file. I installed using:
sudo apt install apt-file
sudo apt-file update
This update took ages and some of the packages are quite large. Now even when I use
sudo apt update
there seems to be additional repos that were added when I installed apt-file.
$ sudo apt update
[sudo] password for david:
Hit:1 http://dl.google.com/linux/earth/deb stable InRelease
Hit:2 https://updates.signal.org/desktop/apt xenial InRelease
Hit:4 http://apt.pop-os.org/proprietary jammy InRelease
Get:5 https://updates.signal.org/desktop/apt xenial/main amd64 Contents (deb) [1,736 B]
Get:3 https://packages.microsoft.com/repos/code stable InRelease [3,590 B]
Get:6 https://packages.microsoft.com/repos/code stable/main amd64 Packages [18.6 kB]
Get:7 https://packages.microsoft.com/repos/code stable/main armhf Packages [18.7 kB]
Hit:8 http://apt.pop-os.org/release jammy InRelease
Get:9 https://packages.microsoft.com/repos/code stable/main arm64 Packages [18.7 kB]
Hit:10 https://ppa.launchpadcontent.net/freecad-maintainers/freecad-daily/ubuntu jammy InRelease
Hit:11 http://apt.pop-os.org/ubuntu jammy InRelease
Hit:12 https://ppa.launchpadcontent.net/freecad-maintainers/freecad-stable/ubuntu jammy InRelease
Get:13 http://apt.pop-os.org/ubuntu jammy-security InRelease [129 kB]
Get:14 http://apt.pop-os.org/ubuntu jammy-updates InRelease [128 kB]
Hit:15 http://apt.pop-os.org/ubuntu jammy-backports InRelease
Get:16 http://apt.pop-os.org/proprietary jammy all Contents (deb) [160 B]
Get:17 http://apt.pop-os.org/proprietary jammy amd64 Contents (deb) [149 kB]
Get:18 http://apt.pop-os.org/ubuntu jammy i386 Contents (deb) [36.9 MB]
Get:19 http://apt.pop-os.org/ubuntu jammy amd64 Contents (deb) [46.9 MB]
Get:20 http://apt.pop-os.org/ubuntu jammy-security amd64 Contents (deb) [128 MB]
Get:21 http://apt.pop-os.org/ubuntu jammy-security i386 Contents (deb) [57.6 MB]
Get:22 http://apt.pop-os.org/ubuntu jammy-updates/main amd64 Packages [1,988 kB]
Get:23 http://apt.pop-os.org/ubuntu jammy-updates i386 Contents (deb) [59.9 MB]
Get:24 http://apt.pop-os.org/ubuntu jammy-updates amd64 Contents (deb) [132 MB]
Get:25 http://apt.pop-os.org/ubuntu jammy-backports i386 Contents (deb) [721 kB]
Get:26 http://apt.pop-os.org/ubuntu jammy-backports amd64 Contents (deb) [730 kB]
Fetched 465 MB in 1min 48s (4,318 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
48 packages can be upgraded. Run 'apt list --upgradable' to see them.
I think from Get:13
to Get:26
are new and were added when I installed apt-file
. And some of them are quite large (ie. 128Mb).
I was instructed to use apt-file
as follows:
sudo apt-file list freecad
but when I run that command I get the message:
$ apt-file list freecad
Finding relevant cache files to search ...E: The cache is empty. You need to run "apt-file update" first.
even after I just did an update with sudo apt-file update
How do I undo all of this? I don't really care about getting apt-file
working. I would be happy just removing it and getting rid of these extra repos.
I'm using PopOS 22.04 LTS
Edit:
:/var/lib/apt/lists$ ll | grep Contents
-rw-r--r-- 1 root root 121 Sep 4 21:46 apt.pop-os.org_proprietary_dists_jammy_Contents-all.lz4
-rw-r--r-- 1 root root 295798 Sep 4 21:46 apt.pop-os.org_proprietary_dists_jammy_Contents-amd64.lz4
-rw-r--r-- 1 root root 1228496 Jul 19 00:53 apt.pop-os.org_ubuntu_dists_jammy-backports_Contents-amd64.lz4
-rw-r--r-- 1 root root 1210558 Jul 19 00:54 apt.pop-os.org_ubuntu_dists_jammy-backports_Contents-i386.lz4
-rw-r--r-- 1 root root 78887238 Apr 21 2022 apt.pop-os.org_ubuntu_dists_jammy_Contents-amd64.lz4
-rw-r--r-- 1 root root 61822472 Apr 21 2022 apt.pop-os.org_ubuntu_dists_jammy_Contents-i386.lz4
-rw-r--r-- 1 root root 205323747 Jul 26 09:33 apt.pop-os.org_ubuntu_dists_jammy-security_Contents-amd64.lz4
-rw-r--r-- 1 root root 93188769 Jul 26 15:41 apt.pop-os.org_ubuntu_dists_jammy-security_Contents-i386.lz4
-rw-r--r-- 1 root root 211888095 Jul 26 01:31 apt.pop-os.org_ubuntu_dists_jammy-updates_Contents-amd64.lz4
-rw-r--r-- 1 root root 96983720 Jul 26 06:31 apt.pop-os.org_ubuntu_dists_jammy-updates_Contents-i386.lz4
-rw-r--r-- 1 root root 3240 Sep 4 23:00 updates.signal.org_desktop_apt_dists_xenial_main_Contents-amd64.lz4
iamthebull
(61 rep)
Sep 7, 2024, 05:22 PM
• Last activity: Sep 7, 2024, 06:58 PM
13
votes
4
answers
3211
views
Why does apt-file report "The cache is empty" even after running "apt-file update"?
Does anybody know why apt-file reports that the cache is empty even after running `apt-file update` and `apt update`? [pop-os ~][I]% apt-file search /usr/lib/android-sdk/tools/bin/sdkmanager E: The cache is empty. You need to run "apt update" first. [pop-os ~][I]% apt-file update Reading package lis...
Does anybody know why apt-file reports that the cache is empty even after running
apt-file update
and apt update
?
[pop-os ~][I]% apt-file search /usr/lib/android-sdk/tools/bin/sdkmanager
E: The cache is empty. You need to run "apt update" first.
[pop-os ~][I]% apt-file update
Reading package lists... Done
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)
[pop-os ~][I]% sudo !!
sudo apt-file update
Hit:1 http://apt.pop-os.org/proprietary cosmic InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu cosmic InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu cosmic-updates InRelease
Hit:4 http://ppa.launchpad.net/nextcloud-devs/client/ubuntu cosmic InRelease
Hit:5 http://us.archive.ubuntu.com/ubuntu cosmic-security InRelease
Hit:6 http://repository.spotify.com stable InRelease
Hit:7 http://us.archive.ubuntu.com/ubuntu cosmic-backports InRelease
Get:8 http://apt.pop-os.org/proprietary cosmic all Contents (deb) [102 kB]
Hit:9 http://ppa.launchpad.net/system76/pop/ubuntu cosmic InRelease
Get:10 http://us.archive.ubuntu.com/ubuntu cosmic amd64 Contents (deb) [40.9 MB]
Get:11 http://apt.pop-os.org/proprietary cosmic i386 Contents (deb) [276 B]
Get:12 http://apt.pop-os.org/proprietary cosmic amd64 Contents (deb) [2,605 kB]
Get:13 http://us.archive.ubuntu.com/ubuntu cosmic i386 Contents (deb) [40.2 MB]
Get:14 http://us.archive.ubuntu.com/ubuntu cosmic-updates i386 Contents (deb) [5,178 kB]
Get:15 http://us.archive.ubuntu.com/ubuntu cosmic-updates amd64 Contents (deb) [6,997 kB]
Get:16 http://us.archive.ubuntu.com/ubuntu cosmic-security i386 Contents (deb) [3,784 kB]
Get:17 http://us.archive.ubuntu.com/ubuntu cosmic-security amd64 Contents (deb) [5,296 kB]
Get:18 http://us.archive.ubuntu.com/ubuntu cosmic-backports amd64 Contents (deb) [3,773 B]
Get:19 http://us.archive.ubuntu.com/ubuntu cosmic-backports i386 Contents (deb) [3,772 B]
Fetched 105 MB in 21s (4,952 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
148 packages can be upgraded. Run 'apt list --upgradable' to see them.
sudo -E apt-file update 20.30s user 1.16s system 95% cpu 22.585 total
[pop-os ~][I]% apt-file search /usr/lib/android-sdk/tools/bin/sdkmanager
E: The cache is empty. You need to run "apt update" first.
[pop-os ~][I]% apt update
Reading package lists... Done
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)
[pop-os ~][I]% sudo !!
sudo apt update
Hit:1 http://apt.pop-os.org/proprietary cosmic InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu cosmic InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu cosmic-updates InRelease
Hit:4 http://us.archive.ubuntu.com/ubuntu cosmic-security InRelease
Hit:5 http://ppa.launchpad.net/nextcloud-devs/client/ubuntu cosmic InRelease
Hit:6 http://us.archive.ubuntu.com/ubuntu cosmic-backports InRelease
Get:7 http://apt.pop-os.org/proprietary cosmic i386 Contents (deb) [276 B]
Hit:8 http://repository.spotify.com stable InRelease
Get:9 http://apt.pop-os.org/proprietary cosmic all Contents (deb) [102 kB]
Hit:10 http://ppa.launchpad.net/system76/pop/ubuntu cosmic InRelease
Get:11 http://us.archive.ubuntu.com/ubuntu cosmic amd64 Contents (deb) [40.9 MB]
Get:12 http://apt.pop-os.org/proprietary cosmic amd64 Contents (deb) [2,605 kB]
Get:13 http://us.archive.ubuntu.com/ubuntu cosmic i386 Contents (deb) [40.2 MB]
Get:14 http://us.archive.ubuntu.com/ubuntu cosmic-updates i386 Contents (deb) [5,178 kB]
Get:15 http://us.archive.ubuntu.com/ubuntu cosmic-updates amd64 Contents (deb) [6,997 kB]
Get:16 http://us.archive.ubuntu.com/ubuntu cosmic-security amd64 Contents (deb) [5,296 kB]
Get:17 http://us.archive.ubuntu.com/ubuntu cosmic-security i386 Contents (deb) [3,784 kB]
Get:18 http://us.archive.ubuntu.com/ubuntu cosmic-backports i386 Contents (deb) [3,772 B]
Get:19 http://us.archive.ubuntu.com/ubuntu cosmic-backports amd64 Contents (deb) [3,773 B]
Fetched 105 MB in 21s (4,963 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
148 packages can be upgraded. Run 'apt list --upgradable' to see them.
sudo -E apt update 20.24s user 1.15s system 95% cpu 22.470 total
[pop-os ~][I]% apt-file search /usr/lib/android-sdk/tools/bin/sdkmanager
E: The cache is empty. You need to run "apt update" first.
[pop-os ~][I]% sudo !!
sudo apt-file search /usr/lib/android-sdk/tools/bin/sdkmanager
E: The cache is empty. You need to run "apt update" first.
Distro is Pop!_OS (an Ubuntu derivative), but I couldn't find a Pop!_OS tag.
jayhendren
(8638 rep)
Feb 28, 2019, 04:08 AM
• Last activity: Jun 25, 2024, 08:13 PM
21
votes
4
answers
41103
views
Package "fontconfig" not found despite having installed libfontconfig1-dev
Whilst attempting to compile [poppler](http://poppler.freedesktop.org) from source I get the error `Package "fontconfig" not found`. I have found a lot of other resources advertising that this can be fixed by installing both `pkg-config` and `libfontconfig1-dev` to get the libraries, but I still got...
Whilst attempting to compile [poppler](http://poppler.freedesktop.org) from source I get the error
Package "fontconfig" not found
.
I have found a lot of other resources advertising that this can be fixed by installing both pkg-config
and libfontconfig1-dev
to get the libraries, but I still got the error.
Trying to install fontconfig
from source failed at the make
step and I've found no resources on how to fix (whole host of C errors).
If I have fontconfig
on the system (and apt
seems to suggest I do) how can I use it when running ./configure
for a package?
M1ke
(589 rep)
Dec 13, 2016, 12:47 PM
• Last activity: Dec 23, 2022, 10:00 PM
0
votes
2
answers
511
views
Preventing "apt-file" from updating its database with each "apt update"
Each time I run `apt update` or with the `-m` option(a.k.a `--fix-missing`) I see that apt-file is trying to update its cache too.I have a slow internet connection and it takes so much to download more than 100MB of `apt-file` caches and when I'm in a hurry this is quite annoying.Is there any way to...
Each time I run
apt update
or with the -m
option(a.k.a --fix-missing
) I see that apt-file is trying to update its cache too.I have a slow internet connection and it takes so much to download more than 100MB of apt-file
caches and when I'm in a hurry this is quite annoying.Is there any way to disable that temporarily?
Parsa Mousavi
(1130 rep)
Jul 26, 2020, 08:42 AM
• Last activity: Aug 2, 2020, 01:16 PM
2
votes
1
answers
1415
views
Apt-file cache files location
Where are the cache files of the `apt-file` program ? Looks like it has some large files because it contains the information about files within all the packages in the repository (installed or uninstalled).But I cannot find their location.
Where are the cache files of the
apt-file
program ? Looks like it has some large files because it contains the information about files within all the packages in the repository (installed or uninstalled).But I cannot find their location.
Parsa Mousavi
(1130 rep)
Jun 18, 2020, 10:17 PM
• Last activity: Jun 19, 2020, 06:17 AM
0
votes
1
answers
331
views
apt-file can not find a dkms file
Before I upgrade to Debian Bullseye, `apt-file` was pretty logical. Now I can't get it to work. What am I doing wrong? Did the behavior change? # apt-file update Hit:1 http://repo.steampowered.com/steam precise InRelease Hit:2 https://updates.signal.org/desktop/apt xenial InRelease Hit:3 http://secu...
Before I upgrade to Debian Bullseye,
apt-file
was pretty logical. Now I can't get it to work. What am I doing wrong? Did the behavior change?
# apt-file update
Hit:1 http://repo.steampowered.com/steam precise InRelease
Hit:2 https://updates.signal.org/desktop/apt xenial InRelease
Hit:3 http://security.debian.org/debian-security bullseye-security InRelease
Hit:4 http://deb.debian.org/debian bullseye InRelease
Hit:5 https://packages.riot.im/debian default InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
9 packages can be upgraded. Run 'apt list --upgradable' to see them.
Prove the file is there...
# locate v4l2loopback.ko
/usr/lib/modules/5.6.0-1-amd64/updates/dkms/v4l2loopback.ko
/var/lib/dkms/v4l2loopback/0.12.5/5.6.0-1-amd64/x86_64/module/v4l2loopback.ko
apt-file
can't tell me what package provides it:
# apt-file search v4l2loopback.ko
... nothing...
What package provides v4l2loopback.ko
? How can I find it out? Did the behavior of apt-file
change?
-------
Dpkg also can't find it.
# dpkg -S /usr/lib/modules/5.6.0-1-amd64/updates/dkms/v4l2loopback.ko
dpkg-query: no path found matching pattern /usr/lib/modules/5.6.0-1-amd64/updates/dkms/v4l2loopback.ko
Evan Carroll
(34663 rep)
May 21, 2020, 02:10 AM
• Last activity: May 21, 2020, 02:49 AM
1
votes
1
answers
73
views
apt-file list shows only two files for nginx package
I wanted to check how many files come with the `nginx` package. However the corresponding command seems to indicate that the package comes with only two files (?) $ apt-file list nginx nginx: /usr/share/doc/nginx/changelog.Debian.gz nginx: /usr/share/doc/nginx/copyright How is this possible given th...
I wanted to check how many files come with the
nginx
package. However the corresponding command seems to indicate that the package comes with only two files (?)
$ apt-file list nginx
nginx: /usr/share/doc/nginx/changelog.Debian.gz
nginx: /usr/share/doc/nginx/copyright
How is this possible given that e.g. the corresponding list for apache2
contains 197 files?
pkaramol
(3109 rep)
May 6, 2019, 07:31 AM
• Last activity: May 6, 2019, 08:37 AM
0
votes
1
answers
133
views
Debian/Ubuntu: Differences between apt-file find/search
Is there a practical difference between these two commands? /home/pkaramol/Desktop $ sudo apt-file search logrotate.conf logrotate: /etc/logrotate.conf logrotate: /usr/share/man/man5/logrotate.conf.5.gz petitboot: /etc/logrotate.d/petitboot/logrotate.conf rsync: /usr/share/doc/rsync/examples/logrota...
Is there a practical difference between these two commands?
/home/pkaramol/Desktop
$ sudo apt-file search logrotate.conf
logrotate: /etc/logrotate.conf
logrotate: /usr/share/man/man5/logrotate.conf.5.gz
petitboot: /etc/logrotate.d/petitboot/logrotate.conf
rsync: /usr/share/doc/rsync/examples/logrotate.conf.rsync
unicorn: /usr/share/doc/unicorn/examples/logrotate.conf
/home/pkaramol/Desktop
$ sudo apt-file find logrotate.conf
logrotate: /etc/logrotate.conf
logrotate: /usr/share/man/man5/logrotate.conf.5.gz
petitboot: /etc/logrotate.d/petitboot/logrotate.conf
rsync: /usr/share/doc/rsync/examples/logrotate.conf.rsync
unicorn: /usr/share/doc/unicorn/examples/logrotate.conf
/home/pkaramol/Desktop/centos_7
According to the help:
search|find Search files in packages
pkaramol
(3109 rep)
Nov 10, 2018, 03:33 PM
• Last activity: Nov 10, 2018, 03:49 PM
1
votes
2
answers
128
views
How do I find all and any 'C' files which are in Debian archive (either in source or in binary)
How do I find all the files either in source or in binary form in Debian package archive? I tried the following but results were not helpful at all: apt-file search *.c and apt-file search *.cc So it either means that there are no c or cc files in the Debian archive (highly unlikely) or my search me...
How do I find all the files either in source or in binary form in Debian package archive?
I tried the following but results were not helpful at all:
apt-file search *.c
and
apt-file search *.cc
So it either means that there are no c or cc files in the Debian archive (highly unlikely) or my search method was not good (more likely). The apt-file index is already updated.
shirish
(12954 rep)
Apr 28, 2015, 08:48 PM
• Last activity: Oct 31, 2015, 11:51 PM
Showing page 1 of 9 total questions