No, apt-get
is not deprecated. The man page of apt
has this to say about apt
vs. apt-get
(and apt-cache
):
SCRIPT USAGE AND DIFFERENCES FROM OTHER APT TOOLS
The apt(8) commandline is designed as an end-user tool and it may change behavior between versions. While it tries not to break
backward compatibility this is not guaranteed either if a change seems beneficial for interactive use.
All features of apt(8) are available in dedicated APT tools like apt-get(8) and apt-cache(8) as well. apt(8) just changes the
default
value of some options (see apt.conf(5) and specifically the Binary scope). So you should prefer using these commands (potentially
with
some additional options enabled) in your scripts as they keep backward compatibility as much as possible.
apt
also gives a warning that says
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
if it detects there is a pipe. For example:
$ apt show python | grep Package
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Package: python
APT-Sources: http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
As for your questions,
do i have to replace all apt-get commands with apt
?
No, you don't have to replace apt-get
with apt
. Rather if you were using it in scripts, you should stick to apt-get
because it has a stable CLI API and guaranteed backward compatibility.
is apt-get
dangerous?
apt
is as dangerous as apt-get
: you should only install software from sources you trust.
can i use apt
in Ubuntu 15.10?
Yup, you can. The problem here is you are still using Ubuntu 15.10, which is now unsupported! Please upgrade to 16.04, which is a LTS version.
will my programs still work?
By programs, I assume you mean scripts. Yes, they will still work since apt-get
is not deprecated. In fact, you should prefer to use apt-get
in scripts for backward compatibility as suggested by apt
's man page.
apt
is because it's shorter thanapt-get
. Less keystrokes, less time spent. I useapt-get
for things likecheck
though.