You are not logged in.
Hi guys, I was trying to install a package but realized that I was getting this annoying error:
- When trying to remove a package
[root@alex alex]# pacman -R spotify
error: failed to init transaction (unable to lock database)
error: could not lock database: No space left on device- The same when installing
[root@alex alex]# pacman -S spotify
error: failed to init transaction (unable to lock database)
error: could not lock database: No space left on device- When updating
[root@alex alex]# pacman -Syu
:: Synchronizing package databases...
error: failed to update core (unable to lock database)
error: failed to update extra (unable to lock database)
error: failed to update community (unable to lock database)
error: failed to update multilib (unable to lock database)
error: failed to synchronize any databases
error: failed to init transaction (unable to lock database)
error: could not lock database: No space left on device The thing is that I have enough space. This is my output for df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 20511356 18422440 1023956 95% /
dev 2009316 0 2009316 0% /dev
run 2013444 556 2012888 1% /run
tmpfs 2013444 640 2012804 1% /dev/shm
tmpfs 2013444 0 2013444 0% /sys/fs/cgroup
tmpfs 2013444 184 2013260 1% /tmp
/dev/sda3 458497216 230842932 205320244 53% /home
tmpfs 402692 20 402672 1% /run/user/1000 I tried to remove the lock after killing all pacman processes but doesn't exists:
[root@alex alex]# rm /var/lib/pacman/db.lck
rm: cannot remove ‘/var/lib/pacman/db.lck’: No such file or directoryCan you please help?
Offline
Your root partition is at 95% use and I believe by default when you format partitions it reserves 5% for root's files. Since the system won't access that last 5%, your root partition for system files is essentially at 100% capacity. So pacman is right there is no space left.
Offline
Out of inodes maybe? What does `df -i` say?
Offline
95 % used it too much for safety. Consider using `ncdu -x /` to locate the excess and clear it.
Some suggestions that are likely not harmful:
1) bleachbit-cli from the AUR or bleachbit from the official repos
# bleachbit --clean system.cache system.localizations system.trash2) Use paccache to remove old packages. Pretty safe to keep 2 old versions:
# paccache -vrk 23) If systemd's logs are too large limit the size in /etc/systemd/journald.conf --> "SystemMaxUse=500M"
Offline
You don't have to run pacman as root.
Using just '-R' to remove may leave unneeded packages behind.
Offline
You guys where right. There were no inodes available so I used bleachbit to clean the system a little and it worked. I still don't get why it wasn't possible to remove programs though
Thanks!
Offline
Because when pacman starts it checks to see if the lock file exists, if it does, pacman knows that pacman is already running and won't run. If the file doesn't exist, pacman knows that pacman isn't already running and it is safe to proceed. Because you were out of space, there was nowhere to put the file even though you were trying to remove a package.
Offline