Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to stop ftp and remove the service on Ubuntu 14.04

I tried sudo apt-get remove ftp and checked using command ps aux | grep ftp but the service was still running.

Please suggest some way to stop it.

share|improve this question
Which FTP service did you install ? – NGRhodes Jun 9 '14 at 10:30
Frankly speaking, I have not installed ftp service (or dont know if anyone else installed on it). I installed Ubuntu 14.03 on my new laptop. After executing command "ps aux | grep ftp" i am getting output "<machinename> 5587 0.0 0.0 15940 920 pts/6 S+ 13:31 0:00 grep --color=auto ftp". Can you please suggest a way to check which ftp service is running. While doing troubleshooting i executed remove command for vsftpd, proftpd,.... etc. – keshav Jun 9 '14 at 11:43
Sorry for the confusion, but I have realised you have made a mistake, see my new answer below. – NGRhodes Jun 9 '14 at 12:09
up vote 2 down vote accepted

I don't know why I did not spot this earlier. I've left my other answer alone to avoid confusion

There is no FTP service

What you are seeing when you are running ps aux | grep ftp is the process of the same command.

There are better ways of searching the process using the commands pgrep or pidof. Simple way to run these:

pgrep ftp
pidof ftp

In both cases will simply return the PID if there is a process running of the name given or nothing if no process found of the given name.

share|improve this answer
Thanks @NGRhodes. After executing above commands i do not found any ftp service. It conclude that ftp is not running on my machine. But do you know why i am getting output to "ps aux | grep ftp" ? – keshav Jun 9 '14 at 13:33
The command is finding itself in the process list :) – NGRhodes Jun 9 '14 at 13:42

To stop the service:

sudo service vsftpd stop

To remove the service

sudo apt-get remove vsftpd
share|improve this answer
Thanks for the answer. I tried command to stop but i am getting output as "vsftp: unrecognized service". – keshav Jun 6 '14 at 11:31
Hi its vsftpd not vsftp, answer has been updated – NGRhodes Jun 6 '14 at 12:30
same output for vsftpd :( "vsftpd: unrecognized service" – keshav Jun 9 '14 at 8:04
Regardless of the OP's system state - this answer answers the question for others looking to actually uninstall vsftpd (a basic ftp service). For those looking to see what ftp service they have running they can use the command: sudo netstat -ntpl – TomO Mar 1 at 3:29

First of all you will have to identify which FTP server you are running because there are a lot (vsftpd, pro-ftpd, ...). I suggest that you do dpkg -l|grep ftpd to see which FTP daemon is installed. The name of the service to use is usually the name of the displayed package without the version number, e.g. proftpd or pure-ftpd or anything other depending of your installation.

When you have identified in the output the name of the FTP server package, just do :

sudo stop <name>

if you get an error like <name>: unknown job this is because is not upstart enabled. Then simply try :

sudo service <name> stop

Then, just remove the package using the standard command :

sudo apt-get remove <name>

or (if you want to get rid of all config files and so on) :

sudo apt-get purge <name>
share|improve this answer
Tried command "dpkg -l|grep ftpd" but not getting any output. When i am executing an command "ps aux | grep ftp" i am getting output "<username>+ 5587 0.0 0.0 15940 920 pts/6 S+ 13:31 0:00 grep --color=auto ftp" – keshav Jun 9 '14 at 8:06
The you have no FTP server running nor installed. – Benoit Jun 10 '14 at 9:57

Firstly check which package/service is responsible for your FTP service:

$ service --status-all 2>&1 | grep ftp
 [ - ]  proftpd

If it's still not clear, check by:

sudo netstat -ap | grep ftp

Then remove it (apt will automatically stop the service):

$ sudo apt-get remove proftpd-basic
Removing proftpd-mod-vroot ...
Removing proftpd-basic ...
[ ok ] Stopping ftp server: proftpd.

If it's not proftpd, then change to whatever package which deals with your FTP service.

Test with telnet:

$ telnet localhost ftp

If you've got Connection refused, then your server is more secured.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.