I made a script and moved it to /usr/bin, then i removed it, but now when i try to use apt to update or upgrade and install something, i get that message at the end "sh: 1: /usr/bin/test: not found"("test" was the name of the script), can someone help me, this is really annoying, Thanks.
/usr/bin/test is an important system utility, provided by the
coreutils package. When you moved your script
/usr/bin you overwrote it.
You should be able to reinstall it using
sudo apt install --reinstall coreutils
If the missing
test binary is preventing
apt from running at all, then you can probably replace it temporarily with a link to
/bin/busybox just so that
apt install --reinstall can complete
In the future, resist the urge to use
/usr/bin for non-system scripts or programs - put personal scripts in
~/bin and site-wide ones in