My server was recently migrated via rsync
, while everything appears to work correctly apt
doesn't recognize the existence of some packages and services.
Question:
Is there a way to 'refresh' apt so that it will recognize all packages and services currently on the server?
Example of the problem
This shows php7.4-fpm is installed and currently running
root@admin:~# service php7.4-fpm status
● php7.4-fpm.service - The PHP 7.4 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.4-fpm.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2022-02-21 20:10:25 CST; 20h ago
Docs: man:php-fpm7.4(8)
Process: 1339 ExecStartPost=/usr/lib/php/php-fpm-socket-helper install /run/php/php-fpm.so>
Main PID: 915 (php-fpm7.4)
Status: "Processes active: 0, idle: 2, Requests: 1236, slow: 0, Traffic: 0req/sec"
Tasks: 3 (limit: 4612)
Memory: 3.9M
CGroup: /system.slice/php7.4-fpm.service
├─ 915 php-fpm: master process (/etc/php/7.4/fpm/php-fpm.conf)
├─1326 php-fpm: pool www
└─1327 php-fpm: pool www
Whereas this shows apt doesn't recognize the php7.4 package (same is true for apache, mysql, etc.)
root@admin:/etc/apt# apt remove php7.4-fpm
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'php7.4-fpm' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Assistance appreciated
Solutions that I have tried
#rm /var/lib/apt/lists/lock
#rm /var/lib/dpkg/lock
#rm /var/lib/dpkg/lock-frontend
#dpkg --configure -a
#apt clean
#apt update --fix-missing
#apt install -f
#dpkg --configure -a
#apt upgrade
#reboot
Literally, everything is functioning properly.. only apt
doesn't recognize that my packages exist.