I use zsh. when I try to upgrade the system, some packages related to php pop up, I want to remove them
$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
fonts-opensymbol kdelibs-bin kdelibs5-data kdelibs5-plugins kdoctools
libkcmutils4 libkde3support4 libkdeclarative5 libkdecore5 libkdesu5
libkdeui5 libkdewebkit5 libkdnssd4 libkemoticons4 libkfile4 libkhtml5
libkidletime4 libkio5 libkjsapi4 libkjsembed4 libkmediaplayer4
libknewstuff3-4 libknotifyconfig4 libkntlm4 libkparts4 libkprintutils4
libkpty4 libkrosscore4 libktexteditor4 libnepomuk4 libnepomukquery4a
libnepomukutils4 libplasma3 libsolid4 libssl1.0.0 libssl1.0.0:i386
libthreadweaver4 openssl php-pear php5-cli php5-common php5-curl php5-fpm
php5-gd php5-intl php5-mysql php5-pspell php5-readline php5-recode php5-snmp
php5-sqlite php5-tidy php5-xmlrpc php5-xsl
54 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 18.4 MB/20.0 MB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
What I tried:
sudo apt-get remove php
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php
▶ sudo apt-get remove php*
zsh: no matches found: php*
sudo apt-get remove php *
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'dropbox' is not installed, so not removed
E: Unable to locate package php
E: Unable to locate package avlfolder
E: Unable to locate package boot-scripts
E: Unable to locate package Calibre Library
E: Unable to locate package Desktop
E: Unable to locate package Documents
E: Unable to locate package Downloads
E: Unable to locate package Dungeons and Dragons Online
E: Unable to locate package Games
E: Unable to locate package java ide
E: Unable to locate package jdownloader
E: Unable to locate package lello
E: Unable to locate package liberam
E: Unable to locate package Music
E: Unable to locate package netbeans-8.0
E: Couldn't find any package by regex 'netbeans-8.0'
E: Unable to locate package netbeans-8.0.desktop
E: Couldn't find any package by regex 'netbeans-8.0.desktop'
E: Unable to locate package Pictures
E: Unable to locate package PlayOnLinux's virtual drives
E: Unable to locate package projects
E: Unable to locate package Public
E: Unable to locate package qtprojects
E: Unable to locate package Savage2
E: Unable to locate package sketchbook
E: Unable to locate package Templates
E: Unable to locate package text.txt
E: Couldn't find any package by regex 'text.txt'
E: Unable to locate package themes
E: Unable to locate package tor-browser-linux64-3.6.1_en-US.tar.xz
E: Couldn't find any package by regex 'tor-browser-linux64-3.6.1_en-US.tar.xz'
E: Unable to locate package Videos
E: Unable to locate package VirtualBox VMs
E: Unable to locate package workspace
E: Unable to locate package xal
And I tried the same with php5
and with purge
, nothing has changed. autoremove
didn't work either
Update
Since I had no answer so far, I ran
sudo apt-get remove --purge php-pear php5-cli php5-common php5-curl php5-fpmphp5-gd php5-intl php5-mysql php5-pspell php5-readline php5-recode php5-snmpphp5-sqlite php5-tidy php5-xmlrpc php5-xsl
[sudo] password for elie:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php5-fpmphp5-gd
E: Unable to locate package php5-snmpphp5-sqlite
I was looking for a better solution, anyway I don't understand how php5-fpmphp5-gd
and php5-snmpphp5-sqlite
need to be upgraded if they aren't installed. How could the system detect that they need to be upgraded, but didn't detect them when I tried to remove them?
sudo apt-get remove php *
IS A REALLY BAD IDEA. Basically you're saying - 'remove package php and everything else'. It will remove ALL your installed programs because of the space between yourphp
and*
.*
in that command is a glob that (in the OP's shell) expands to all the files in the current directory, so if you have files called "myfile.txt" and "otherfile.csv" in the current directory,sudo apt-get remove php *
expands tosudo apt-get remove php myfile.txt otherfile.csv
which is obviously not what you want because it won't work.php5-fpmphp5-gd
andphp5-snmpphp5-sqlite
butphp5-fpm php5-gd php5-snmp php5-sqlite
which are installed if the system wants to update them.