Yesterday I incidently called apt-get with an ending "-". I noticed that I got promped if I wanted to remove the file. My question is if it's safe. I've never heard of anyone doing it so I just wanted to know.
Syntax:
161659/home/riwa# apt-get install links2-
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be REMOVED:
links2
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B of archives.
After unpacking 3211kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 109839 files and directories currently installed.)
Removing links2 ...
# man 8 apt-get
[...]
install
install is followed by one or more packages desired for installation. Each package is a package name, not a fully qualified filename (for
instance, in a Debian GNU/Linux system, libc6 would be the argument provided, not libc6_1.9.6-2.deb) All packages required by the pack-
age(s) specified for installation will also be retrieved and installed. The /etc/apt/sources.list file is used to locate the desired
packages. If a hyphen is appended to the package name (with no intervening space), the identified package will be removed if it is in-
stalled. Similarly a plus sign can be used to designate a package to install. These latter features may be used to override decisions
made by apt-get's conflict resolution system.
[...]
remove remove is identical to install except that packages are removed instead of installed. If a plus sign is appended to the package name
(with no intervening space), the identified package will be installed instead of removed.